package com.sg.service.biz.component.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.base.component.req.*;
import com.sg.dto.biz.component.req.*;
import com.sg.dto.biz.component.res.*;
import com.sg.entity.OmsConfApplexRel;
import com.sg.entity.OmsConfScheme;
import com.sg.entity.OmsConfSchemeOptionResult;
import com.sg.entity.OmsSchemeOpenRecord;
import com.sg.service.base.component.*;
import com.sg.service.biz.component.ConfSchemeService;
import com.sg.service.biz.component.DivineDataService;
import com.sg.service.biz.component.InterfaceModeService;
import com.sg.service.biz.component.StatisticalDataService;
import com.sg.service.biz.component.nb.NbSchemeOpenRecord;
import com.wicket.okrcomponent.common.annotations.BanAuto;
import com.sg.common.exception.Assert;
import com.wicket.okrcomponent.common.exception.BizException;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class SchemeOpenRecordServiceImpl
        implements com.wicket.okrcomponent.biz.service.SchemeOpenRecordService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    private MOmsSchemeOpenRecordService mOmsSchemeOpenRecordService;
    // @Resource
    // private undefinedService undefinedService;
    // @Resource
    // private MCustomFieldsService mCustomFieldsService;
    @Resource
    private MOmsConfSchemeOptionResultService mOmsConfSchemeOptionResultService;
    @Resource
    private MOmsConfSchemeService mOmsConfSchemeService;
    @Resource
    private MOmsConfApplexRelService mOmsConfApplexRelService;
    @Resource
    private NbSchemeOpenRecord nbSchemeOpenRecord;
    //    @Resource
//    private SchemeOpenRecordService fwCompSchemeOpenRecordClient;
//@Resource
//  private MOmsUnstructuredDataService mOmsUnstructuredDataService;
    @Resource
    private ConfSchemeService confSchemeService;
    @Resource
    private DivineDataService divineDataService;
    @Resource
    private InterfaceModeService interfaceModeService;
    @Resource
    private MCustomFields3Service mCustomFields3Service;
    @Resource
    private StatisticalDataService statisticalDataService;
//@Resource
    //private MSystemPersonInfoService mSystemPersonInfoService;
//@Resource
    //private MCustomFields2Service mCustomFields2Service;


    /**
     * D2-3新增方案开通记录[2116]
     * gen by moon at 9/13/2022, 6:00:29 PM
     */
    @Trace(operationName = "D2-3新增方案开通记录")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddSchemeOpenRecordRespDto addSchemeOpenRecord(AddSchemeOpenRecordReqDto reqDto) {


        String string_1 = null;
//virtualUsage 2-3-04查询配置方案详情  2467
        OmsConfScheme omsConfScheme = null;
        QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
        if (reqDto != null) {
            queryConfSchemeDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//sourceId:61873_1_2467
        }

        /*2-3-04查询配置方案详情[1923]   */
        Assert.isNull(queryConfSchemeDetailReq.getConfSchemeId(), "D2-3新增方案开通记录-2-3-04查询配置方案详情-配置方案ID 不能为空", false);
        omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq);
        Assert.isTrue(omsConfScheme == null || omsConfScheme.getConfSchemeId() == null, "返回值不能为空", false);


        if ((omsConfScheme != null && omsConfScheme.getAuthType() != null && omsConfScheme.getAuthType().equals("QUANTITY"))) {
            //if(2-3-04查询配置方案详情.授权类型 等于 数量型)  2468

            String string = null;
            if (omsConfScheme != null) {
                OmsSchemeOpenRecord omsSchemeOpenRecord = new OmsSchemeOpenRecord();
                omsSchemeOpenRecord.setAuthUseType("USABLE");//sourceId:79450_1_2469
                if (omsConfScheme != null) {
                    omsSchemeOpenRecord.setConfSchemeId(omsConfScheme.getConfSchemeId());//sourceId:61265_1_2469
                    omsSchemeOpenRecord.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//sourceId:61266_1_2469
                    omsSchemeOpenRecord.setAuthType(omsConfScheme.getAuthType());//sourceId:79448_1_2469
                    omsSchemeOpenRecord.setAuthUnit(omsConfScheme.getAuthUnit());//sourceId:79449_1_2469
                    omsSchemeOpenRecord.setRemainingQty(omsConfScheme.getAuthorizationNum());//sourceId:63052_1_2469
                }
                if (reqDto != null) {
                    omsSchemeOpenRecord.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:61267_1_2469
                    omsSchemeOpenRecord.setIsMainConfScheme(reqDto.getIsMainConfScheme());//sourceId:80726_1_2469
                    omsSchemeOpenRecord.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:61271_1_2469
                }

                /*2-3-12新增方案开通记录[1951]   */
                Assert.isNull(omsSchemeOpenRecord.getConfSchemeId(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-配置方案ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getConfSchemeCode(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-配置方案标识不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getAuthType(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-授权类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getTenantSpaceId(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-租户空间ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getIsMainConfScheme(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-是否主配置方案不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getAuthUseType(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-授权使用类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getSubjectLifeCycle(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-主体生命周期不能为空", false);
                string = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord);


                string_1 = string;
            }
        } else if ((omsConfScheme != null && omsConfScheme.getAuthType() != null && omsConfScheme.getAuthType().equals("CYCLE_TIME"))) {
            //elseif(2-3-04查询配置方案详情.授权类型 等于 周期时间型)  2470

//ModelCode: getTimeRange
            ObtainTimeScopeSearchRespDto getTimeRangeRes = null;
            if (omsConfScheme != null) {
                ObtainTimeScopeSearchReqDto getTimeRangeReq = new ObtainTimeScopeSearchReqDto();
                getTimeRangeReq.setSystemCurrentTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:79493_1_5650
                if (omsConfScheme != null) {
                    getTimeRangeReq.setAuthorizationNum(omsConfScheme.getAuthorizationNum());//sourceId:79457_1_5650
                    getTimeRangeReq.setAuthUnit(omsConfScheme.getAuthUnit());//sourceId:79494_1_5650
                }

                /*M2获取时间范围查询（特殊方法）[2567]  入参：数量，当前时间，数量单位（默认年）。逻辑：当前时间+数量（年）出参：开始时间（当前时间），结束时间（计算后的时间） */
                Assert.isNull(getTimeRangeReq.getAuthorizationNum(), "D2-3新增方案开通记录-M2获取时间范围查询（特殊方法）-授权数量不能为空", false);
                Assert.isNull(getTimeRangeReq.getSystemCurrentTime(), "D2-3新增方案开通记录-M2获取时间范围查询（特殊方法）-系统当前时间不能为空", false);
                Assert.isNull(getTimeRangeReq.getAuthUnit(), "D2-3新增方案开通记录-M2获取时间范围查询（特殊方法）-授权单位不能为空", false);
                getTimeRangeRes = nbSchemeOpenRecord.obtainTimeScopeSearch(getTimeRangeReq);


            }
            String string_2 = null;
            if (omsConfScheme != null) {
                OmsSchemeOpenRecord omsSchemeOpenRecord_1 = new OmsSchemeOpenRecord();
                omsSchemeOpenRecord_1.setAuthUseType("USABLE");//sourceId:79450_1_2471
                if (omsConfScheme != null) {
                    omsSchemeOpenRecord_1.setConfSchemeId(omsConfScheme.getConfSchemeId());//sourceId:61265_1_2471
                    omsSchemeOpenRecord_1.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//sourceId:61266_1_2471
                    omsSchemeOpenRecord_1.setAuthType(omsConfScheme.getAuthType());//sourceId:79448_1_2471
                    omsSchemeOpenRecord_1.setAuthUnit(omsConfScheme.getAuthUnit());//sourceId:79449_1_2471
                }
                if (reqDto != null) {
                    omsSchemeOpenRecord_1.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:61267_1_2471
                    omsSchemeOpenRecord_1.setIsMainConfScheme(reqDto.getIsMainConfScheme());//sourceId:80726_1_2471
                    omsSchemeOpenRecord_1.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:61271_1_2471
                }
                if (getTimeRangeRes != null) {
                    omsSchemeOpenRecord_1.setStartTime(getTimeRangeRes.getStartTime());//sourceId:79443_1_2471
                    omsSchemeOpenRecord_1.setEndTime(getTimeRangeRes.getEndTime());//sourceId:79444_1_2471
                }

                /*2-3-12新增方案开通记录[1951]   */
                Assert.isNull(omsSchemeOpenRecord_1.getConfSchemeId(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-配置方案ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_1.getConfSchemeCode(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-配置方案标识不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_1.getAuthType(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-授权类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_1.getTenantSpaceId(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-租户空间ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_1.getIsMainConfScheme(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-是否主配置方案不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_1.getAuthUseType(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-授权使用类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_1.getSubjectLifeCycle(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-主体生命周期不能为空", false);
                string_2 = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord_1);


                string_1 = string_2;
            }
        } else if ((omsConfScheme != null && omsConfScheme.getAuthType() != null && omsConfScheme.getAuthType().equals("FIXED_TIME"))) {
            //elseif(2-3-04查询配置方案详情.授权类型 等于 固定时间型)  5640

            String string_3 = null;
            if (omsConfScheme != null) {
                OmsSchemeOpenRecord omsSchemeOpenRecord_2 = new OmsSchemeOpenRecord();
                omsSchemeOpenRecord_2.setAuthUseType("USABLE");//sourceId:79450_1_5641
                if (omsConfScheme != null) {
                    omsSchemeOpenRecord_2.setConfSchemeId(omsConfScheme.getConfSchemeId());//sourceId:61265_1_5641
                    omsSchemeOpenRecord_2.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//sourceId:61266_1_5641
                    omsSchemeOpenRecord_2.setAuthType(omsConfScheme.getAuthType());//sourceId:79448_1_5641
                }
                if (reqDto != null) {
                    omsSchemeOpenRecord_2.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:61267_1_5641
                    omsSchemeOpenRecord_2.setStartTime(reqDto.getStartTime());//sourceId:79443_1_5641
                    omsSchemeOpenRecord_2.setEndTime(reqDto.getEndTime());//sourceId:79444_1_5641
                    omsSchemeOpenRecord_2.setIsMainConfScheme(reqDto.getIsMainConfScheme());//sourceId:80726_1_5641
                    omsSchemeOpenRecord_2.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:61271_1_5641
                }

                /*2-3-12新增方案开通记录[1951]   */
                Assert.isNull(omsSchemeOpenRecord_2.getConfSchemeId(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-配置方案ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getConfSchemeCode(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-配置方案标识不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getAuthType(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-授权类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getTenantSpaceId(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-租户空间ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getIsMainConfScheme(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-是否主配置方案不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getAuthUseType(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-授权使用类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getSubjectLifeCycle(), "D2-3新增方案开通记录-2-3-12新增方案开通记录-主体生命周期不能为空", false);
                string_3 = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord_2);


                string_1 = string_3;
            }
        }
        if ((reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("CURRENTLY_VALID") && omsConfScheme != null && omsConfScheme.getApplObjType() != null && omsConfScheme.getApplObjType().equals("TENANT_SPACE"))) {
            //if((D2-3新增方案开通记录.主体生命周期 等于 当前有效 and 2-3-04查配置方案（授权类型、数量、单位、应用对象类型等）.应用对象类型 等于 租户空间))  13774

            OmsSchemeOpenRecord omsSchemeOpenRecord_3 = null;
            QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
            if (reqDto != null) {
                querySchemeOpenRecordDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//sourceId:314792_1_15981
                querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:314794_1_15981
            }

            /*2-3-12查询方案开通记录详情[1954]   */
            Assert.isNull(querySchemeOpenRecordDetailReq.getConfSchemeId(), "D2-3新增方案开通记录-2-3-12查询方案开通记录详情-配置方案ID不能为空", false);
            Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2-3新增方案开通记录-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
            omsSchemeOpenRecord_3 = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq);
            Assert.isTrue(omsSchemeOpenRecord_3 == null || omsSchemeOpenRecord_3.getSchOpenRecordId() == null, "返回值不能为空", false);


            AddApplexConrelComRespDto addApplexConrelComRespDto = null;
            if (omsSchemeOpenRecord_3 != null && omsConfScheme != null) {
                AddApplexConrelComReqDto addApplexConrelComReqDto = new AddApplexConrelComReqDto();
                addApplexConrelComReqDto.setApplexType("TENANT_SPACE");//sourceId:106739_1_13775
                addApplexConrelComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:106737_1_13775
                if (omsSchemeOpenRecord_3 != null) {
                    addApplexConrelComReqDto.setSchOpenRecordId(omsSchemeOpenRecord_3.getSchOpenRecordId());//sourceId:314789_1_13775
                }
                if (omsConfScheme != null) {
                    addApplexConrelComReqDto.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//sourceId:106738_1_13775
                    addApplexConrelComReqDto.setIsInitialScheme(omsConfScheme.getIsInitialScheme());//sourceId:312545_1_13775
                }
                if (reqDto != null) {
                    addApplexConrelComReqDto.setApplexId(reqDto.getTenantSpaceId());//sourceId:106740_1_13775
                    addApplexConrelComReqDto.setAscriptionSpaceId(reqDto.getTenantSpaceId());//sourceId:106741_1_13775
                    addApplexConrelComReqDto.setResultAspObjId(reqDto.getTenantSpaceId());//sourceId:106736_1_13775
                    addApplexConrelComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:106744_1_13775
                }

                /*D2-3构建实例配置关系并克隆答案[3102]   */
                Assert.isNull(addApplexConrelComReqDto.getSchOpenRecordId(), "D2-3新增方案开通记录-D2-3构建实例配置关系并克隆答案-方案开通记录ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getConfSchemeCode(), "D2-3新增方案开通记录-D2-3构建实例配置关系并克隆答案-配置方案标识不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexId(), "D2-3新增方案开通记录-D2-3构建实例配置关系并克隆答案-应用实例ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexType(), "D2-3新增方案开通记录-D2-3构建实例配置关系并克隆答案-应用实例类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getAscriptionSpaceId(), "D2-3新增方案开通记录-D2-3构建实例配置关系并克隆答案-归属空间ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getIsInitialScheme(), "D2-3新增方案开通记录-D2-3构建实例配置关系并克隆答案-是否初始方案答案不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getSubjectLifeCycle(), "D2-3新增方案开通记录-D2-3构建实例配置关系并克隆答案-主体生命周期不能为空", false);
                addApplexConrelComRespDto = addApplexConrelCom(addApplexConrelComReqDto);


            }
//processBranchName:正常结束 ,processBranchId:13776

        } else {
            //else  13777

//processBranchName:正常结束 ,processBranchId:13778

        }
        AddSchemeOpenRecordRespDto retData = new AddSchemeOpenRecordRespDto();
        if (string_1 != null) {
            retData.setSchOpenRecordId(string_1);//sourceId:61333_1
        }


        return retData;
    }

    /**
     * D2-3查询应用实例配置关系列表[2143]
     * gen by moon at 5/6/2023, 2:54:49 PM
     */
    @Trace(operationName = "D2-3查询应用实例配置关系列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryApplexConrelListRespDto queryApplexConrelList(QueryApplexConrelListReqDto reqDto) {


        OmsConfScheme omsConfScheme_1 = null;
        List<OmsConfApplexRel> listOmsConfApplexRel_1 = new ArrayList<>();
//步骤0: 2-3-04查询配置方案详情 - queryConfSchemeDetail
        OmsConfScheme omsConfScheme = null;
        QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
        queryConfSchemeDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:258691_1
        if (reqDto != null) {
            queryConfSchemeDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:896475_1
        }

        /*2-3-04查询配置方案详情[1923]   */
        Assert.isNull(queryConfSchemeDetailReq.getConfSchemeId(), "D2-3查询应用实例配置关系列表-2-3-04查询配置方案详情-配置方案ID 不能为空", false);
        Assert.isNull(queryConfSchemeDetailReq.getSubjectLifeCycle(), "D2-3查询应用实例配置关系列表-2-3-04查询配置方案详情-生命周期状态不能为空", false);
        omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq)/*vcase invoke 本地 method 方法调用;*/;
        Assert.isTrue(omsConfScheme == null || omsConfScheme.getConfSchemeId() == null, "找不到数据，系统异常", false);

        omsConfScheme_1 = omsConfScheme;

//步骤1: 2-3-13查询应用实例配置关系列表 - queryApplexConrelList
        List<OmsConfApplexRel> listOmsConfApplexRel = new ArrayList<>();
        if (omsConfScheme != null) {
            QueryApplexConrelListReq queryApplexConrelListReq = new QueryApplexConrelListReq();
            if (reqDto != null) {
                queryApplexConrelListReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:896476_1
                queryApplexConrelListReq.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:62383_1
            }
            if (omsConfScheme != null) {
                queryApplexConrelListReq.setApplexType(omsConfScheme.getApplObjType());//SimpleFieldAssign//sourceId:62380_1
            }

            /*2-3-13查询应用实例配置关系列表[2124]   */
            Assert.isNull(queryApplexConrelListReq.getConfSchemeId(), "D2-3查询应用实例配置关系列表-2-3-13查询应用实例配置关系列表-配置方案ID不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getAscriptionSpaceId(), "D2-3查询应用实例配置关系列表-2-3-13查询应用实例配置关系列表-归属空间ID不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getApplexType(), "D2-3查询应用实例配置关系列表-2-3-13查询应用实例配置关系列表-应用实例类型不能为空", false);
            listOmsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelList(queryApplexConrelListReq)/*vcase invoke 本地 method 方法调用;*/;


            listOmsConfApplexRel_1 = listOmsConfApplexRel;
        }

        QueryApplexConrelListRespDto retData = new QueryApplexConrelListRespDto();
        retData.setApplexConfRelList(listOmsConfApplexRel_1.stream().map(item -> BeanUtil.toBean(item, ApplexConfRelDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:62386_1
        if (omsConfScheme_1 != null) {
            retData.setApplObjType(omsConfScheme_1.getApplObjType());//SimpleFieldAssign//sourceId:258906_1
        }


        return retData;
    }

    /**
     * D2-3修改方案开通记录[2130]
     * gen by moon at 2022/7/3 下午5:10:38
     */
    @Trace(operationName = "D2-3修改方案开通记录")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateSchemeOpenRecordRespDto updateSchemeOpenRecord(UpdateSchemeOpenRecordReqDto reqDto) {


        //步骤0: 2-3-12修改方案开通记录 - updateSchemeOpenRecord
        boolean bOOLEAN;
        OmsSchemeOpenRecord omsSchemeOpenRecord = new OmsSchemeOpenRecord();
        if (reqDto != null) {
            omsSchemeOpenRecord.setSchOpenRecordId(reqDto.getSchOpenRecordId());//sourceId:61834_1
            omsSchemeOpenRecord.setRemainingQty(reqDto.getRemainingQty());//sourceId:61835_1
            omsSchemeOpenRecord.setStartTime(reqDto.getStartTime());//sourceId:61836_1
            omsSchemeOpenRecord.setEndTime(reqDto.getEndTime());//sourceId:61837_1
            omsSchemeOpenRecord.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:61838_1
            omsSchemeOpenRecord.setIsArchive(reqDto.getIsArchive());//sourceId:61839_1
        }

        /*2-3-12修改方案开通记录[1952]   */
        bOOLEAN = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord);


        UpdateSchemeOpenRecordRespDto retData = new UpdateSchemeOpenRecordRespDto();


        return retData;
    }

    /**
     * D2-3删除方案开通记录[2121]
     * gen by moon at 5/27/2023, 1:04:06 PM
     */
    @Trace(operationName = "D2-3删除方案开通记录")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public DeleteSchemeOpenRecordRespDto deleteSchemeOpenRecord(DeleteSchemeOpenRecordReqDto reqDto) {


        //步骤0: 2-3-12查询方案开通记录详情 - querySchemeOpenRecordDetail
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        querySchemeOpenRecordDetailReq.setIsArchive("FALSE");//sourceId:259129_1
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:259095_1
        }

        /*2-3-12查开通记录[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getSchOpenRecordId(), "D2-3删除方案开通记录-2-3-12查开通记录-开通钥匙ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getIsArchive(), "D2-3删除方案开通记录-2-3-12查开通记录-是否存档不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//步骤1: 2-3-13查询应用实例配置关系列表 - queryApplexConrelList
        List<OmsConfApplexRel> listOmsConfApplexRel = new ArrayList<>();
        if (omsSchemeOpenRecord != null) {
            QueryApplexConrelListReq queryApplexConrelListReq = new QueryApplexConrelListReq();
            if (omsSchemeOpenRecord != null) {
                queryApplexConrelListReq.setConfSchemeId(omsSchemeOpenRecord.getConfSchemeId());//SimpleFieldAssign//sourceId:379938_1
                queryApplexConrelListReq.setAscriptionSpaceId(omsSchemeOpenRecord.getTenantSpaceId());//SimpleFieldAssign//sourceId:259085_1
            }

            /*2-3-13查开通记录使用关系列表[2124]   */
            Assert.isNull(queryApplexConrelListReq.getConfSchemeId(), "D2-3删除方案开通记录-2-3-13查开通记录使用关系列表-配置方案ID不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getAscriptionSpaceId(), "D2-3删除方案开通记录-2-3-13查开通记录使用关系列表-归属空间ID不能为空", false);
            listOmsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelList(queryApplexConrelListReq)/*vcase invoke 本地 method 方法调用;*/;


        }

//步骤2: 2-3-13批量删应用实例配置关系 - batchDeleteApplexConrel
        boolean bOOLEAN;
        if (listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel) && listOmsConfApplexRel.size() > 0) {
            List<String> listString = new ArrayList<>();
            if (listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel) && listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel)) {
                listString = listOmsConfApplexRel.stream().map(item -> item.getApplexRelId())
                        .collect(Collectors.toList());/*list-to-strings*///sourceId:259119_1
            }

            /*2-3-13批量删使用关系[4198]   */

            bOOLEAN = mOmsConfApplexRelService.batchDeleteApplexConrel(listString)/*vcase invoke 本地 method 方法调用;*/;


        }

//步骤3: M2-3-07批量查询配置关系匹配答案 - batchQuerySetRelationMatchAnswer
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        if (listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel) && listOmsConfApplexRel.size() > 0) {
            BatchQuerySetRelationMatchAnswerReq batchQuerySetRelationMatchAnswerReq = new BatchQuerySetRelationMatchAnswerReq();
            if (listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel) && listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel)) {
                batchQuerySetRelationMatchAnswerReq.setSetRelationMatchAnswerList(listOmsConfApplexRel.stream().map(item -> item.getApplexRelId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:314820_1
            }
            if (omsSchemeOpenRecord != null) {
                //batchQuerySetRelationMatchAnswerReq.setAscriptionSpaceId(omsSchemeOpenRecord.getTenantSpaceId());//SimpleFieldAssign//sourceId:986206_1
            }

            /*M2-3-07批量查询克隆答案[4496]   */
            //Assert.isNull(batchQuerySetRelationMatchAnswerReq.getAscriptionSpaceId(),"D2-3删除方案开通记录-M2-3-07批量查询克隆答案-归属空间ID不能为空",false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.batchQuerySetRelationMatchAnswer(batchQuerySetRelationMatchAnswerReq)/*vcase invoke 本地 method 方法调用;*/;


        }

//步骤4: 2-03-07批量删除方案下选项配置结果 - batchDeleteConfItemResult
        boolean bOOLEAN_1;
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
            List<String> listString_1 = new ArrayList<>();
            if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                listString_1 = listOmsConfSchemeOptionResult.stream().map(item -> item.getOptionResultId())
                        .collect(Collectors.toList());/*list-to-strings*///sourceId:259120_1
            }

            /*2-03-07批量删除克隆答案[1988]   */

            bOOLEAN_1 = mOmsConfSchemeOptionResultService.batchDeleteConfItemResult(listString_1)/*vcase invoke 本地 method 方法调用;*/;


        }

//步骤5: 2-3-12删除方案开通记录 - deleteSchemeOpenRecord
        boolean bOOLEAN_2;
        if (omsSchemeOpenRecord != null) {
            String string = new String();
            if (omsSchemeOpenRecord != null) {
                string = omsSchemeOpenRecord.getSchOpenRecordId();
                ;//SimpleFieldAssign//sourceId:61494_1
            }

            /*2-3-12删除方案开通记录[1953]   */
            Assert.isNull(string, "D2-3删除方案开通记录-2-3-12删除方案开通记录-开通钥匙ID不能为空", false);
            bOOLEAN_2 = mOmsSchemeOpenRecordService.deleteSchemeOpenRecord(string)/*vcase invoke 本地 method 方法调用;*/;


        }

        DeleteSchemeOpenRecordRespDto retData = new DeleteSchemeOpenRecordRespDto();


        return retData;
    }

    /**
     * D2-3查询方案开通记录详情[2106]
     * gen by moon at 8/15/2022, 9:40:55 PM
     */
    @Trace(operationName = "D2-3查询方案开通记录详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySchemeOpenRecordDetailRespDto querySchemeOpenRecordDetail(QuerySchemeOpenRecordDetailReqDto reqDto) {


        OmsSchemeOpenRecord omsSchemeOpenRecord_1 = null;
        OmsConfScheme omsConfScheme_1 = null;
//步骤0: 2-3-12查询方案开通记录详情 - querySchemeOpenRecordDetail
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setSchOpenRecordId(reqDto.getSchOpenRecordId());//sourceId:61051_1
            querySchemeOpenRecordDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//sourceId:114599_1
            querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:114586_1
            querySchemeOpenRecordDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:114587_1
            querySchemeOpenRecordDetailReq.setIsArchive(reqDto.getIsArchive());//sourceId:104143_1
        }

        /*2-3-12查询方案开通记录详情[1954]   */

        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq);

        omsSchemeOpenRecord_1 = omsSchemeOpenRecord;

//步骤1: 2-3-04查询配置方案详情 - queryConfSchemeDetail
        OmsConfScheme omsConfScheme = null;
        if (omsSchemeOpenRecord != null) {
            QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
            if (omsSchemeOpenRecord != null) {
                queryConfSchemeDetailReq.setConfSchemeId(omsSchemeOpenRecord.getConfSchemeId());//sourceId:61078_1
            }

            /*2-3-04查询配置方案详情[1923]   */
            Assert.isNull(queryConfSchemeDetailReq.getConfSchemeId(), "D2-3查询方案开通记录详情-2-3-04查询配置方案详情-配置方案ID 不能为空", false);
            omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq);

            omsConfScheme_1 = omsConfScheme;
        }

        QuerySchemeOpenRecordDetailRespDto retData = new QuerySchemeOpenRecordDetailRespDto();
        if (omsSchemeOpenRecord_1 != null) {
            retData.setSchOpenRecordId(omsSchemeOpenRecord_1.getSchOpenRecordId());//sourceId:61102_1
            retData.setConfSchemeId(omsSchemeOpenRecord_1.getConfSchemeId());//sourceId:61104_1
            retData.setConfSchemeCode(omsSchemeOpenRecord_1.getConfSchemeCode());//sourceId:104147_1
            retData.setStartTime(omsSchemeOpenRecord_1.getStartTime());//sourceId:61116_1
            retData.setEndTime(omsSchemeOpenRecord_1.getEndTime());//sourceId:61118_1
            retData.setRemainingQty(omsSchemeOpenRecord_1.getRemainingQty());//sourceId:61114_1
            retData.setIsMainConfScheme(omsSchemeOpenRecord_1.getIsMainConfScheme());//sourceId:82749_1
            retData.setSubjectLifeCycle(omsSchemeOpenRecord_1.getSubjectLifeCycle());//sourceId:61120_1
            retData.setOperationInductionId(omsSchemeOpenRecord_1.getOperationInductionId());//sourceId:61121_1
            retData.setOperateTime(omsSchemeOpenRecord_1.getOperateTime());//sourceId:61122_1
        }
        if (omsConfScheme_1 != null) {
            retData.setConfSchemeName(omsConfScheme_1.getConfSchemeName());//sourceId:61106_1
            retData.setApplObjType(omsConfScheme_1.getApplObjType());//sourceId:61110_1
            retData.setConfSchemeTypeCode(omsConfScheme_1.getConfSchemeTypeCode());//sourceId:61113_1
            retData.setIsCustom(omsConfScheme_1.getIsCustom());//sourceId:61117_1
            retData.setIsOpenCustomConf(omsConfScheme_1.getIsOpenCustomConf());//sourceId:61119_1
            retData.setIsInitialScheme(omsConfScheme_1.getIsInitialScheme());//sourceId:61115_1
            retData.setBizSceneCode(omsConfScheme_1.getBizSceneCode());//sourceId:82675_1
            retData.setConfSchemeDes(omsConfScheme_1.getConfSchemeDes());//sourceId:61108_1
        }


        return retData;
    }

    /**
     * D2-3升级开通方案[2123]
     * gen by moon at 6/10/2023, 2:54:31 PM
     */
    @Trace(operationName = "D2-3升级开通方案")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ArchiveSchemeOpenRecordRespDto archiveSchemeOpenRecord(ArchiveSchemeOpenRecordReqDto reqDto) {


        //步骤0: 2-3-13查询应用实例配置关系列表 - queryApplexConrelList
        List<OmsConfApplexRel> listOmsConfApplexRel = new ArrayList<>();
        QueryApplexConrelListReq queryApplexConrelListReq = new QueryApplexConrelListReq();
        if (reqDto != null) {
            queryApplexConrelListReq.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:986204_1
            queryApplexConrelListReq.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:61903_1
        }

        /*2-3-13查开通记录使用关系列表[2124]   */
        Assert.isNull(queryApplexConrelListReq.getSchOpenRecordId(), "D2-3升级开通方案-2-3-13查开通记录使用关系列表- 开通钥匙ID不能为空", false);
        Assert.isNull(queryApplexConrelListReq.getAscriptionSpaceId(), "D2-3升级开通方案-2-3-13查开通记录使用关系列表-归属空间ID不能为空", false);
        listOmsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelList(queryApplexConrelListReq)/*vcase invoke 本地 method 方法调用;*/;


//步骤1: 2-3-13批量修改应用实例配置关系 - batchUpdateApplexConrel
        boolean bOOLEAN;
        if (listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel) && listOmsConfApplexRel.size() > 0) {
            List<OmsConfApplexRel> listOmsConfApplexRel_2 = new ArrayList<>();
            if (listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel) && listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel)) {
                listOmsConfApplexRel_2 = listOmsConfApplexRel.stream().map(item -> {
                    OmsConfApplexRel elm = BeanUtil.toBean(item, OmsConfApplexRel.class);
                    elm.setSubjectLifeCycle("ARCHIVING");
                    elm.setIsArchive("TRUE");

                    return elm;
                }).collect(Collectors.toList());//objList-to-objLists//sourceId:61949_1
            }

            /*2-3-13批量存档实例配置关系[2132]   */

            bOOLEAN = mOmsConfApplexRelService.batchUpdateApplexConrel(listOmsConfApplexRel_2)/*vcase invoke 本地 method 方法调用;*/;


        }

//步骤2: 2-3-12修改方案开通记录 - updateSchemeOpenRecord
        boolean bOOLEAN_1;
        OmsSchemeOpenRecord omsSchemeOpenRecord = new OmsSchemeOpenRecord();
        omsSchemeOpenRecord.setSubjectLifeCycle("ARCHIVING");//sourceId:61956_1
        omsSchemeOpenRecord.setIsArchive("TRUE");//sourceId:61957_1
        if (reqDto != null) {
            omsSchemeOpenRecord.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:61952_1
        }

        /*2-3-12存档开通记录[1952]   */
        Assert.isNull(omsSchemeOpenRecord.getSchOpenRecordId(), "D2-3升级开通方案-2-3-12存档开通记录-开通钥匙ID不能为空", false);
        Assert.isNull(omsSchemeOpenRecord.getSubjectLifeCycle(), "D2-3升级开通方案-2-3-12存档开通记录-主体生命周期不能为空", false);
        Assert.isNull(omsSchemeOpenRecord.getIsArchive(), "D2-3升级开通方案-2-3-12存档开通记录-是否存档不能为空", false);
        bOOLEAN_1 = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord)/*vcase invoke 本地 method 方法调用;*/;


//步骤3: M2-3-07批量查询配置关系匹配答案 - batchQuerySetRelationMatchAnswer
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        if (listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel) && listOmsConfApplexRel.size() > 0) {
            BatchQuerySetRelationMatchAnswerReq batchQuerySetRelationMatchAnswerReq = new BatchQuerySetRelationMatchAnswerReq();
            if (listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel) && listOmsConfApplexRel != null && !CollectionUtil.isEmpty(listOmsConfApplexRel)) {
                batchQuerySetRelationMatchAnswerReq.setSetRelationMatchAnswerList(listOmsConfApplexRel.stream().map(item -> item.getApplexRelId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:314816_1
            }
            if (reqDto != null) {
                //batchQuerySetRelationMatchAnswerReq.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:986207_1
            }

            /*M2-3-07批量查询原克隆答案[4496]   */
            //Assert.isNull(batchQuerySetRelationMatchAnswerReq.getAscriptionSpaceId(),"D2-3升级开通方案-M2-3-07批量查询原克隆答案-归属空间ID不能为空",false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.batchQuerySetRelationMatchAnswer(batchQuerySetRelationMatchAnswerReq)/*vcase invoke 本地 method 方法调用;*/;


        }

//步骤4: 2-3-07批量修改方案下选项配置结果 - batchUpdateConfItemResult
        boolean bOOLEAN_2;
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
            List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_2 = new ArrayList<>();
            if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                listOmsConfSchemeOptionResult_2 = listOmsConfSchemeOptionResult.stream().map(item -> {
                    OmsConfSchemeOptionResult elm = BeanUtil.toBean(item, OmsConfSchemeOptionResult.class);
                    elm.setSubjectLifeCycle("ARCHIVING");
                    elm.setIsArchive("TRUE");

                    return elm;
                }).collect(Collectors.toList());//objList-to-objLists//sourceId:314819_1
            }

            /*2-3-07批量存档克隆答案[2042]   */

            bOOLEAN_2 = mOmsConfSchemeOptionResultService.batchUpdateConfItemResult(listOmsConfSchemeOptionResult_2)/*vcase invoke 本地 method 方法调用;*/;


        }

        ArchiveSchemeOpenRecordRespDto retData = new ArchiveSchemeOpenRecordRespDto();


        return retData;
    }

    /**
     * D2-3查询方案开通记录列表[2104]
     * gen by moon at 9/13/2022, 3:14:57 AM
     */
    @Trace(operationName = "D2-3查询方案开通记录列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySchemeOpenRecordListRespDto querySchemeOpenRecordList(QuerySchemeOpenRecordListReqDto reqDto) {


        List<OmsSchemeOpenRecord> listOmsSchemeOpenRecord_1 = new ArrayList<>();
        List<OmsConfScheme> listOmsConfScheme_1 = new ArrayList<>();
//步骤0: 2-3-12查询方案开通记录列表 - querySchemeOpenRecordList
        List<OmsSchemeOpenRecord> listOmsSchemeOpenRecord = new ArrayList<>();
        QuerySchemeOpenRecordListReq querySchemeOpenRecordListReq = new QuerySchemeOpenRecordListReq();
        if (reqDto != null) {
            querySchemeOpenRecordListReq.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:60999_1
            querySchemeOpenRecordListReq.setIsMainConfScheme(reqDto.getIsMainConfScheme());//sourceId:104442_1
            querySchemeOpenRecordListReq.setAuthType(reqDto.getAuthType());//sourceId:104441_1
            querySchemeOpenRecordListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:104438_1
            querySchemeOpenRecordListReq.setIsArchive(reqDto.getIsArchive());//sourceId:61001_1
        }

        /*2-3-12查询方案开通记录列表[1955]   */
        Assert.isNull(querySchemeOpenRecordListReq.getTenantSpaceId(), "D2-3查询方案开通记录列表-2-3-12查询方案开通记录列表-租户空间ID不能为空", false);
        listOmsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordList(querySchemeOpenRecordListReq);


        listOmsSchemeOpenRecord_1 = listOmsSchemeOpenRecord;

//步骤1: 2-3-04批量查询配置方案列表 - batchQueryConfSchemeList
        List<OmsConfScheme> listOmsConfScheme = new ArrayList<>();
        if (listOmsSchemeOpenRecord != null && listOmsSchemeOpenRecord.size() > 0) {
            BatchQueryConfSchemeListReq batchQueryConfSchemeListReq = new BatchQueryConfSchemeListReq();
            batchQueryConfSchemeListReq.setConfSchemeList(listOmsSchemeOpenRecord.stream().map(item -> item.getConfSchemeId())
                    .collect(Collectors.toList()));//sourceId:61003_1
            if (reqDto != null) {
                batchQueryConfSchemeListReq.setIsInitialScheme(reqDto.getIsInitialScheme());//sourceId:61009_1
                batchQueryConfSchemeListReq.setApplObjType(reqDto.getApplObjType());//sourceId:104450_1
                batchQueryConfSchemeListReq.setConfSchemeTypeCode(reqDto.getConfSchemeTypeCode());//sourceId:61010_1
                batchQueryConfSchemeListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:104451_1
                batchQueryConfSchemeListReq.setIsArchive(reqDto.getIsArchive());//sourceId:104452_1
            }

            /*2-3-04批量查询配置方案列表[2093]   */

            listOmsConfScheme = mOmsConfSchemeService.batchQueryConfSchemeList(batchQueryConfSchemeListReq);


            listOmsConfScheme_1 = listOmsConfScheme;
        }

        QuerySchemeOpenRecordListRespDto retData = new QuerySchemeOpenRecordListRespDto();
        //数据集融合
        if (listOmsSchemeOpenRecord_1 != null && !CollectionUtil.isEmpty(listOmsSchemeOpenRecord_1)) {
            for (OmsSchemeOpenRecord omsSchemeOpenRecord : listOmsSchemeOpenRecord_1) {
                SchemeOpenRecordDto retElm = new SchemeOpenRecordDto();
                retElm.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//sourceId:33737_2
                retElm.setConfSchemeId(omsSchemeOpenRecord.getConfSchemeId());//sourceId:33738_2
                retElm.setConfSchemeCode(omsSchemeOpenRecord.getConfSchemeCode());//sourceId:57558_2
                retElm.setSubjectLifeCycle(omsSchemeOpenRecord.getSubjectLifeCycle());//sourceId:33742_2
                retElm.setOperationInductionId(omsSchemeOpenRecord.getOperationInductionId());//sourceId:33743_2
                retElm.setOperateTime(omsSchemeOpenRecord.getOperateTime());//sourceId:33744_2
                retElm.setIsArchive(omsSchemeOpenRecord.getIsArchive());//sourceId:58868_2

                if (listOmsConfScheme_1 != null) {
                    for (OmsConfScheme omsConfScheme : listOmsConfScheme_1) {
                        if (omsConfScheme.getConfSchemeId().equals(omsSchemeOpenRecord.getConfSchemeId())) {
                            retElm.setConfSchemeName(omsConfScheme.getConfSchemeName());//sourceId:33741_2
                            retElm.setIsInitialScheme(omsConfScheme.getIsInitialScheme());//sourceId:46882_2
                            retData.getSchemeOpenRecordList().add(retElm);
                        }
                    }
                }

            }
        }//sourceId:61015_1


        return retData;
    }


    /**
     * D2-3新增应用实例配置关系(公共)[3102]
     * gen by moon at 5/5/2023, 9:48:05 PM
     */
    @Trace(operationName = "D2-3新增应用实例配置关系(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddApplexConrelComRespDto addApplexConrelCom(AddApplexConrelComReqDto reqDto) {


        String string_1 = null;
//步骤0: 2-3-13新增应用实例配置关系 - addApplexConrel
        String string = null;
        OmsConfApplexRel omsConfApplexRel = new OmsConfApplexRel();
        if (reqDto != null) {
            omsConfApplexRel.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:461230_1
            omsConfApplexRel.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:379607_1
            omsConfApplexRel.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:106700_1
            omsConfApplexRel.setApplexType(reqDto.getApplexType());//SimpleFieldAssign//sourceId:106698_1
            omsConfApplexRel.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:106699_1
            omsConfApplexRel.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:106703_1
            omsConfApplexRel.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:106701_1
        }

        /*2-3-13新增使用关系[2120]   */
        Assert.isNull(omsConfApplexRel.getSchOpenRecordId(), "D2-3新增应用实例配置关系(公共)-2-3-13新增使用关系-方案开通记录ID不能为空", false);
        Assert.isNull(omsConfApplexRel.getConfSchemeId(), "D2-3新增应用实例配置关系(公共)-2-3-13新增使用关系-配置方案ID不能为空", false);
        Assert.isNull(omsConfApplexRel.getConfSchemeCode(), "D2-3新增应用实例配置关系(公共)-2-3-13新增使用关系-配置方案标识不能为空", false);
        Assert.isNull(omsConfApplexRel.getApplexType(), "D2-3新增应用实例配置关系(公共)-2-3-13新增使用关系-应用实例类型不能为空", false);
        Assert.isNull(omsConfApplexRel.getApplexId(), "D2-3新增应用实例配置关系(公共)-2-3-13新增使用关系-应用实例ID不能为空", false);
        Assert.isNull(omsConfApplexRel.getAscriptionSpaceId(), "D2-3新增应用实例配置关系(公共)-2-3-13新增使用关系-归属空间ID不能为空", false);
        Assert.isNull(omsConfApplexRel.getSubjectLifeCycle(), "D2-3新增应用实例配置关系(公共)-2-3-13新增使用关系-主体生命周期不能为空", false);
        string = mOmsConfApplexRelService.addApplexConrel(omsConfApplexRel)/*vcase invoke 本地 method 方法调用;*/;


        string_1 = string;

//步骤1: 2-3-07查询方案下选项配置结果列表 - queryConfItemResultList
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
        queryConfItemResultListReq.setIsPlatData("TRUE");//sourceId:308064_1
        queryConfItemResultListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:106707_1
        if (reqDto != null) {
            queryConfItemResultListReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:449188_1
        }

        /*2-3-07查标准答案[1940]   */
        Assert.isNull(queryConfItemResultListReq.getConfSchemeId(), "D2-3新增应用实例配置关系(公共)-2-3-07查标准答案-配置方案ID 不能为空", false);
        Assert.isNull(queryConfItemResultListReq.getIsInitialScheme(), "D2-3新增应用实例配置关系(公共)-2-3-07查标准答案-是否初始方案答案不能为空", false);
        Assert.isNull(queryConfItemResultListReq.getIsPlatData(), "D2-3新增应用实例配置关系(公共)-2-3-07查标准答案-是否标准答案不能为空", false);
        Assert.isNull(queryConfItemResultListReq.getSubjectLifeCycle(), "D2-3新增应用实例配置关系(公共)-2-3-07查标准答案-主体生命周期不能为空", false);
        listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq)/*vcase invoke 本地 method 方法调用;*/;
        Assert.isTrue(listOmsConfSchemeOptionResult == null || CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) || listOmsConfSchemeOptionResult == null || CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) || listOmsConfSchemeOptionResult.size() == 0, "找不到数据，系统异常", false);


//步骤2: 2-3-07批量新增方案下选项配置结果 - batchAddConfItemResult
        boolean bOOLEAN;
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
            List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_2 = new ArrayList<>();
            if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                String finalString = string;
                listOmsConfSchemeOptionResult_2 = //objList-to-objLists
                        listOmsConfSchemeOptionResult.stream().map(item -> {
                            OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                            elm.setEndValue(item.getEndValue());//SimpleFieldAssign//sourceId:58249_2
                            elm.setExtensionField1(item.getExtensionField1());//SimpleFieldAssign//sourceId:61426_2
                            elm.setExtensionField2(item.getExtensionField2());//SimpleFieldAssign//sourceId:61427_2
                            elm.setExtensionField3(item.getExtensionField3());//SimpleFieldAssign//sourceId:61428_2
                            elm.setClassConfItemId(item.getClassConfItemId());//SimpleFieldAssign//sourceId:94435_2
                            elm.setConfOptionRshipId(item.getConfOptionRshipId());//SimpleFieldAssign//sourceId:58252_2
                            elm.setIsPlatData("FALSE");//sourceId:58253_2
                            elm.setIsCeResult("FALSE");//sourceId:58254_2
                            elm.setOptionType(item.getOptionType());//SimpleFieldAssign//sourceId:58250_2
                            elm.setResultType(item.getResultType());//SimpleFieldAssign//sourceId:58248_2
                            elm.setIsSingleResult(item.getIsSingleResult());//SimpleFieldAssign//sourceId:58267_2
                            elm.setOptionThrowPlace(item.getOptionThrowPlace());//SimpleFieldAssign//sourceId:89884_2
                            elm.setConfOptionSortNum(item.getConfOptionSortNum());//SimpleFieldAssign//sourceId:61429_2
                            elm.setConfOptionCode(item.getConfOptionCode());//SimpleFieldAssign//sourceId:58260_2
                            elm.setConfOptionName(item.getConfOptionName());//SimpleFieldAssign//sourceId:58261_2
                            elm.setConfItemCode(item.getConfItemCode());//SimpleFieldAssign//sourceId:58251_2
                            elm.setShortName(item.getShortName());//SimpleFieldAssign//sourceId:58262_2
                            elm.setConfItemClassCode(item.getConfItemClassCode());//SimpleFieldAssign//sourceId:58263_2
                            elm.setConfItemClassName(item.getConfItemClassName());//SimpleFieldAssign//sourceId:58264_2
                            elm.setConfSchemeId(item.getConfSchemeId());//SimpleFieldAssign//sourceId:58257_2
                            elm.setConfSchemeName(item.getConfSchemeName());//SimpleFieldAssign//sourceId:58265_2
                            if (reqDto != null) {
                                elm.setSchOpenRecordId(reqDto.getSchOpenRecordId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:94993_2
                                elm.setResultAspObjType(reqDto.getResultAspObjType());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58255_2
                                elm.setResultAspObjId(reqDto.getResultAspObjId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58256_2
                                elm.setIsInitialScheme(reqDto.getIsInitialScheme());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58266_2
                                elm.setConfSchemeCode(reqDto.getConfSchemeCode());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58258_2
                                elm.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58259_2
                            }
                            if (finalString != null) {
                                elm.setApplexRelId(finalString);//SimpleFieldAssign//sourceId:94992_2
                            }
                            return elm;
                        }).collect(Collectors.toList());//objList-to-objLists//sourceId:106721_1
            }

            /*2-3-07克隆标准答案[2031]   */

            bOOLEAN = mOmsConfSchemeOptionResultService.batchAddConfItemResult(listOmsConfSchemeOptionResult_2)/*vcase invoke 本地 method 方法调用;*/;


        }

        AddApplexConrelComRespDto retData = new AddApplexConrelComRespDto();
        if (string_1 != null) {
            retData.setApplexRelId(string_1);//SimpleFieldAssign//sourceId:106735_1
        }


        return retData;
    }


    /**
     * D2-3更新方案开通记录回增(公共)[3165]
     * gen by moon at 5/5/2023, 9:48:21 PM
     */
    @Trace(operationName = "D2-3更新方案开通记录回增(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public RefreshSchemeOpenRecordAddComRespDto refreshSchemeOpenRecordAddCom(RefreshSchemeOpenRecordAddComReqDto reqDto) {


        //virtualUsage 2-3-12查询方案开通记录详情  6072
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        querySchemeOpenRecordDetailReq.setIsArchive("FALSE");//sourceId:446147_1_6072
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:889894_1_6072
            querySchemeOpenRecordDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:114689_1_6072
            querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:114690_1_6072
        }

        /*2-3-12查询方案开通记录详情[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2-3更新方案开通记录回增(公共)-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getIsArchive(), "D2-3更新方案开通记录回增(公共)-2-3-12查询方案开通记录详情-是否存档不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("QUANTITY"))) {
            //if(2-3-12查开通记录.授权类型 等于 数量型)  6073

//ModelCode: receptionService
            ObtainReceiveFieldsRespDto receptionServiceRes = null;
            ObtainReceiveFieldsReqDto receptionServiceReq = new ObtainReceiveFieldsReqDto();
            receptionServiceReq.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:890074_1_39665

            /*M2-约定【1】[4007]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getOutputNum(), "D2-3更新方案开通记录回增(公共)-M2-约定【1】-传输数值（整数型）不能为空", false);
            receptionServiceRes = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq);


            boolean bOOLEAN;
            if (omsSchemeOpenRecord != null) {
                OmsSchemeOpenRecord omsSchemeOpenRecord_2 = new OmsSchemeOpenRecord();
                if (omsSchemeOpenRecord != null) {
                    omsSchemeOpenRecord_2.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:114708_1_6074
                }
                if (receptionServiceRes != null) {
                    omsSchemeOpenRecord_2.setRemainingQty(receptionServiceRes.getOutputNum());//SimpleFieldAssign//sourceId:114709_1_6074
                }

                /*2-3-12开通方案自动加1[1952]   */
                Assert.isNull(omsSchemeOpenRecord_2.getSchOpenRecordId(), "D2-3更新方案开通记录回增(公共)-2-3-12开通方案自动加1-方案开通记录ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getRemainingQty(), "D2-3更新方案开通记录回增(公共)-2-3-12开通方案自动加1-剩余授权数不能为空", false);
                bOOLEAN = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_2)/*vcase invoke 本地 method 方法调用;*/;


            }
            OmsSchemeOpenRecord omsSchemeOpenRecord_3 = null;
            QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq_1 = new QuerySchemeOpenRecordDetailReq();
            querySchemeOpenRecordDetailReq_1.setIsArchive("FALSE");//sourceId:446147_1_6075
            if (reqDto != null) {
                querySchemeOpenRecordDetailReq_1.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:114689_1_6075
                querySchemeOpenRecordDetailReq_1.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:114690_1_6075
            }

            /*2-3-12查询方案开通记录详情[1954]   */
            Assert.isNull(querySchemeOpenRecordDetailReq_1.getTenantSpaceId(), "D2-3更新方案开通记录回增(公共)-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
            Assert.isNull(querySchemeOpenRecordDetailReq_1.getIsArchive(), "D2-3更新方案开通记录回增(公共)-2-3-12查询方案开通记录详情-是否存档不能为空", false);
            omsSchemeOpenRecord_3 = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq_1)/*vcase invoke 本地 method 方法调用;*/;


            if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getRemainingQty() != null && omsSchemeOpenRecord != null && omsSchemeOpenRecord.getRemainingQty() == 0L)) {
                //if((2-3-12查开通记录.剩余授权数 值不等于空  and 2-3-12查开通记录.剩余授权数 等于 0))  6076

//异常结束 39666
                throw new BizException("220200160", "对不起！异常错误，请联系管理员~", false);
            }
        } else if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("CYCLE_TIME") || omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("FIXED_TIME"))) {
            //elseif((2-3-12查开通记录.授权类型 等于 周期时间型 or 2-3-12查开通记录.授权类型 等于 固定时间型))  6081

//ModelCode: timeEfficiencyCheck
            CheckTimeScopeSearchRespDto timeEfficiencyCheckRes = null;
            if (omsSchemeOpenRecord != null) {
                CheckTimeScopeSearchReqDto timeEfficiencyCheckReq = new CheckTimeScopeSearchReqDto();
                timeEfficiencyCheckReq.setCurrentTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:114722_1_6082
                if (omsSchemeOpenRecord != null) {
                    timeEfficiencyCheckReq.setCompareTime(omsSchemeOpenRecord.getEndTime());//SimpleFieldAssign//sourceId:127315_1_6082
                }

                /*M2检查时间范围（特殊方法）[2472]  入参开始时间（参照值）、结束时间（比较值）两个字段，计算比较值与参照值大小，输出两个时间比较结果之前（小于）、当前（等于）、之后（大于） */
                Assert.isNull(timeEfficiencyCheckReq.getCurrentTime(), "D2-3更新方案开通记录回增(公共)-M2检查时间范围（特殊方法）-当前时间不能为空", false);
                timeEfficiencyCheckRes = nbSchemeOpenRecord.checkTimeScopeSearch(timeEfficiencyCheckReq);


            }
            if ((timeEfficiencyCheckRes != null && timeEfficiencyCheckRes.getTimeCompareResult() != null && timeEfficiencyCheckRes.getTimeCompareResult().equals("LATER"))) {
                //if(M2判断是否过期.时间比较结果 等于 之后（大于）)  6083

                boolean bOOLEAN_1;
                if (omsSchemeOpenRecord != null) {
                    OmsSchemeOpenRecord omsSchemeOpenRecord_4 = new OmsSchemeOpenRecord();
                    omsSchemeOpenRecord_4.setAuthUseType("EXPIRE__DISABLED");//sourceId:114731_1_39667
                    if (omsSchemeOpenRecord != null) {
                        omsSchemeOpenRecord_4.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:114725_1_39667
                    }

                    /*2-3-12修改开通记录授权状态（到期不可用）[1952]   */
                    Assert.isNull(omsSchemeOpenRecord_4.getSchOpenRecordId(), "D2-3更新方案开通记录回增(公共)-2-3-12修改开通记录授权状态（到期不可用）-方案开通记录ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getAuthUseType(), "D2-3更新方案开通记录回增(公共)-2-3-12修改开通记录授权状态（到期不可用）-授权使用类型不能为空", false);
                    bOOLEAN_1 = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_4)/*vcase invoke 本地 method 方法调用;*/;


                }
            }
        }
        RefreshSchemeOpenRecordAddComRespDto retData = new RefreshSchemeOpenRecordAddComRespDto();


        return retData;
    }

    /**
     * D2-3更新方案开通记录扣减(公共)[3104]
     * gen by moon at 9/13/2022, 6:00:56 PM
     */
    @Trace(operationName = "D2-3更新方案开通记录扣减(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @BanAuto
    @Override
    public RefreshSchemeOpenRecordDeductionComRespDto refreshSchemeOpenRecordDeductionCom(RefreshSchemeOpenRecordDeductionComReqDto reqDto) {


        //virtualUsage 2-3-12查询方案开通记录详情  5696
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        querySchemeOpenRecordDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:106800_1_5696
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//sourceId:106798_1_5696
            querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:106799_1_5696
        }

        /*2-3-12查询方案开通记录详情[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getConfSchemeCode(), "D2-3更新方案开通记录扣减(公共)-2-3-12查询方案开通记录详情-配置方案标识不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2-3更新方案开通记录扣减(公共)-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getSubjectLifeCycle(), "D2-3更新方案开通记录扣减(公共)-2-3-12查询方案开通记录详情-主体生命周期不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq);


        if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("QUANTITY"))) {
            //if(2-3-12查询方案开通记录详情.授权类型 等于 数量型)  5697

            boolean bOOLEAN;
            if (omsSchemeOpenRecord != null) {
                OmsSchemeOpenRecord omsSchemeOpenRecord_2 = new OmsSchemeOpenRecord();
                //omsSchemeOpenRecord_2.setRemainingQty();//AUTO_SUB  TODO ruizhe dong//sourceId:106818_1_5698
                // TODO: 2022/9/16 晓东，遇到这个模式，按照下面这行我手写的示例代码生成
                if (omsSchemeOpenRecord_2.getRemainingQty() != null) {
                    omsSchemeOpenRecord_2.setRemainingQty(omsSchemeOpenRecord_2.getRemainingQty() - 1);
                }
                if (omsSchemeOpenRecord != null) {
                    omsSchemeOpenRecord_2.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//sourceId:106817_1_5698
                }

                /*2-3-12开通方案自动扣减1[1952]   */
                Assert.isNull(omsSchemeOpenRecord_2.getSchOpenRecordId(), "D2-3更新方案开通记录扣减(公共)-2-3-12开通方案自动扣减1-方案开通记录ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getRemainingQty(), "D2-3更新方案开通记录扣减(公共)-2-3-12开通方案自动扣减1-剩余授权数不能为空", false);
                bOOLEAN = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_2);


            }
            OmsSchemeOpenRecord omsSchemeOpenRecord_3 = null;
            QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq_1 = new QuerySchemeOpenRecordDetailReq();
            querySchemeOpenRecordDetailReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:106800_1_5699
            if (reqDto != null) {
                querySchemeOpenRecordDetailReq_1.setConfSchemeCode(reqDto.getConfSchemeCode());//sourceId:106798_1_5699
                querySchemeOpenRecordDetailReq_1.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:106799_1_5699
            }

            /*2-3-12查询方案开通记录详情[1954]   */
            Assert.isNull(querySchemeOpenRecordDetailReq_1.getConfSchemeCode(), "D2-3更新方案开通记录扣减(公共)-2-3-12查询方案开通记录详情-配置方案标识不能为空", false);
            Assert.isNull(querySchemeOpenRecordDetailReq_1.getTenantSpaceId(), "D2-3更新方案开通记录扣减(公共)-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
            Assert.isNull(querySchemeOpenRecordDetailReq_1.getSubjectLifeCycle(), "D2-3更新方案开通记录扣减(公共)-2-3-12查询方案开通记录详情-主体生命周期不能为空", false);
            omsSchemeOpenRecord_3 = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq_1);


            if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getRemainingQty() > 0)) {
                //if(2-3-12查询方案开通记录详情.剩余授权数 大于 0)  5700

//processBranchName:正常结束 ,processBranchId:5701

            } else {
                //else  5702

                boolean bOOLEAN_1;
                if (omsSchemeOpenRecord_3 != null) {
                    OmsSchemeOpenRecord omsSchemeOpenRecord_4 = new OmsSchemeOpenRecord();
                    omsSchemeOpenRecord_4.setAuthUseType("QUANTITY_INS_DISABLED");//sourceId:106830_1_5703
                    if (omsSchemeOpenRecord_3 != null) {
                        omsSchemeOpenRecord_4.setSchOpenRecordId(omsSchemeOpenRecord_3.getSchOpenRecordId());//sourceId:106824_1_5703
                    }

                    /*2-3-12修改开通方案授权状态（数量不足不可用）[1952]   */
                    Assert.isNull(omsSchemeOpenRecord_4.getSchOpenRecordId(), "D2-3更新方案开通记录扣减(公共)-2-3-12修改开通方案授权状态（数量不足不可用）-方案开通记录ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getAuthUseType(), "D2-3更新方案开通记录扣减(公共)-2-3-12修改开通方案授权状态（数量不足不可用）-授权使用类型不能为空", false);
                    bOOLEAN_1 = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_4);


                }
//processBranchName:正常结束 ,processBranchId:5704

            }
        } else if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("CYCLE_TIME") || omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("FIXED_TIME"))) {
            //elseif((2-3-12查询方案开通记录详情.授权类型 等于 周期时间型 or 2-3-12查询方案开通记录详情.授权类型 等于 固定时间型))  5705

//ModelCode: timeEfficiencyCheck
            CheckTimeScopeSearchRespDto timeEfficiencyCheckRes = null;
            if (omsSchemeOpenRecord != null) {
                CheckTimeScopeSearchReqDto timeEfficiencyCheckReq = new CheckTimeScopeSearchReqDto();
                timeEfficiencyCheckReq.setCurrentTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:106831_1_5706
                if (omsSchemeOpenRecord != null) {
                    timeEfficiencyCheckReq.setCompareTime(omsSchemeOpenRecord.getEndTime());//sourceId:127312_1_5706
                }

                /*M2检查时间范围（特殊方法）[2472]  入参开始时间（参照值）、结束时间（比较值）两个字段，计算比较值与参照值大小，输出两个时间比较结果之前（小于）、当前（等于）、之后（大于） */
                Assert.isNull(timeEfficiencyCheckReq.getCurrentTime(), "D2-3更新方案开通记录扣减(公共)-M2检查时间范围（特殊方法）-当前时间不能为空", false);
                Assert.isNull(timeEfficiencyCheckReq.getCompareTime(), "D2-3更新方案开通记录扣减(公共)-M2检查时间范围（特殊方法）-比较时间不能为空", false);
                timeEfficiencyCheckRes = nbSchemeOpenRecord.checkTimeScopeSearch(timeEfficiencyCheckReq);


            }
            if ((timeEfficiencyCheckRes != null && timeEfficiencyCheckRes.getTimeCompareResult() != null && timeEfficiencyCheckRes.getTimeCompareResult().equals("BEFORE") || timeEfficiencyCheckRes != null && timeEfficiencyCheckRes.getTimeCompareResult() != null && timeEfficiencyCheckRes.getTimeCompareResult().equals("PRESENT"))) {
                //if((M2校验时间有效性（特殊方法）.时间比较结果 等于 之前 or M2校验时间有效性（特殊方法）.时间比较结果 等于 当前))  5707

//processBranchName:正常结束 ,processBranchId:5708

            } else {
                //else  5709

                boolean bOOLEAN_2;
                if (omsSchemeOpenRecord != null) {
                    OmsSchemeOpenRecord omsSchemeOpenRecord_5 = new OmsSchemeOpenRecord();
                    omsSchemeOpenRecord_5.setAuthUseType("EXPIRE__DISABLED");//sourceId:106840_1_5712
                    if (omsSchemeOpenRecord != null) {
                        omsSchemeOpenRecord_5.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//sourceId:106834_1_5712
                    }

                    /*2-3-12修改开通方案状态（到期不可用）[1952]   */
                    Assert.isNull(omsSchemeOpenRecord_5.getSchOpenRecordId(), "D2-3更新方案开通记录扣减(公共)-2-3-12修改开通方案状态（到期不可用）-方案开通记录ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_5.getAuthUseType(), "D2-3更新方案开通记录扣减(公共)-2-3-12修改开通方案状态（到期不可用）-授权使用类型不能为空", false);
                    bOOLEAN_2 = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_5);


                }
//processBranchName:正常结束 ,processBranchId:5711

            }
        }
        RefreshSchemeOpenRecordDeductionComRespDto retData = new RefreshSchemeOpenRecordDeductionComRespDto();


        return retData;
    }

    /**
     * D2-3删除应用实例配置关系(公共)[3164]
     * gen by moon at 4/26/2023, 12:18:24 AM
     */
    @Trace(operationName = "D2-3删除应用实例配置关系(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public DeleteApplexConrelComRespDto deleteApplexConrelCom(DeleteApplexConrelComReqDto reqDto) {


        //步骤0: 2-3-13查询应用实例配置关系详情 - queryApplexConrelDetail
        OmsConfApplexRel omsConfApplexRel = null;
        QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
        if (reqDto != null) {
            queryApplexConrelDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:114650_1
            queryApplexConrelDetailReq.setApplexType(reqDto.getApplexType());//SimpleFieldAssign//sourceId:114636_1
            queryApplexConrelDetailReq.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:114637_1
            queryApplexConrelDetailReq.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:114638_1
        }

        /*2-3-13查询应用实例配置关系详情[2122]   */
        Assert.isNull(queryApplexConrelDetailReq.getConfSchemeCode(), "D2-3删除应用实例配置关系(公共)-2-3-13查询应用实例配置关系详情-配置方案标识不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getApplexType(), "D2-3删除应用实例配置关系(公共)-2-3-13查询应用实例配置关系详情-应用实例类型不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getApplexId(), "D2-3删除应用实例配置关系(公共)-2-3-13查询应用实例配置关系详情-应用实例ID不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getAscriptionSpaceId(), "D2-3删除应用实例配置关系(公共)-2-3-13查询应用实例配置关系详情-归属空间ID不能为空", false);
        omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//步骤1: 2-3-13删除应用实例配置关系 - deleteApplexConrel
        boolean bOOLEAN;
        if (omsConfApplexRel != null) {
            String string = new String();
            if (omsConfApplexRel != null) {
                string = omsConfApplexRel.getApplexRelId();
                ;//SimpleFieldAssign//sourceId:114635_1
            }

            /*2-3-13删除应用实例配置关系[2373]   */
            Assert.isNull(string, "D2-3删除应用实例配置关系(公共)-2-3-13删除应用实例配置关系-应用实例配置关系ID不能为空", false);
            bOOLEAN = mOmsConfApplexRelService.deleteApplexConrel(string)/*vcase invoke 本地 method 方法调用;*/;


        }

//步骤2: 2-3-07查询方案下选项配置结果列表 - queryConfItemResultList
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
        queryConfItemResultListReq.setResultAspObjType("EVA_THEME");//sourceId:114662_1
        if (reqDto != null) {
            queryConfItemResultListReq.setResultAspObjId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:114663_1
            queryConfItemResultListReq.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:114654_1
        }

        /*2-3-07查询方案下选项配置结果列表[1940]   */
        Assert.isNull(queryConfItemResultListReq.getResultAspObjId(), "D2-3删除应用实例配置关系(公共)-2-3-07查询方案下选项配置结果列表-答案归属对象ID不能为空", false);
        Assert.isNull(queryConfItemResultListReq.getResultAspObjType(), "D2-3删除应用实例配置关系(公共)-2-3-07查询方案下选项配置结果列表-答案归属对象类型不能为空", false);
        Assert.isNull(queryConfItemResultListReq.getConfSchemeCode(), "D2-3删除应用实例配置关系(公共)-2-3-07查询方案下选项配置结果列表-配置方案标识不能为空", false);
        listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq)/*vcase invoke 本地 method 方法调用;*/;


//步骤3: 2-03-07批量删除方案下选项配置结果 - batchDeleteConfItemResult
        boolean bOOLEAN_1;
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
            List<String> listString = new ArrayList<>();
            listString = listOmsConfSchemeOptionResult.stream().map(item -> item.getOptionResultId())
                    .collect(Collectors.toList());/*list-to-strings*///sourceId:114673_1

            /*2-03-07批量删除方案下选项配置结果[1988]   */

            bOOLEAN_1 = mOmsConfSchemeOptionResultService.batchDeleteConfItemResult(listString)/*vcase invoke 本地 method 方法调用;*/;


        }

        DeleteApplexConrelComRespDto retData = new DeleteApplexConrelComRespDto();


        return retData;
    }

    /**
     * D2-3发布方案开通记录(公共)[4119]
     * gen by moon at 10/16/2022, 11:05:05 AM
     */
    @Trace(operationName = "D2-3发布方案开通记录(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ReleaseSchemeOpenRecordComRespDto releaseSchemeOpenRecordCom(ReleaseSchemeOpenRecordComReqDto reqDto) {


        //virtualUsage 2-3-12查询方案开通记录详情  13784
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:234320_1_13784
        }

        /*2-3-12查询方案开通记录详情[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getSchOpenRecordId(), "D2-3发布方案开通记录(公共)-2-3-12查询方案开通记录详情-方案开通记录ID不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq);


        if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getSubjectLifeCycle() != null && omsSchemeOpenRecord.getSubjectLifeCycle().equals("EDITING"))) {
            //if(2-3-12查询方案开通记录详情.主体生命周期 等于 正在编辑)  14758

        }
//virtualUsage 2-3-12修改方案开通记录  13782
        boolean bOOLEAN;
        OmsSchemeOpenRecord omsSchemeOpenRecord_2 = new OmsSchemeOpenRecord();
        omsSchemeOpenRecord_2.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:234289_1_13782
        if (reqDto != null) {
            omsSchemeOpenRecord_2.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:234285_1_13782
        }

        /*2-3-12修改方案开通记录[1952]   */
        Assert.isNull(omsSchemeOpenRecord_2.getSchOpenRecordId(), "D2-3发布方案开通记录(公共)-2-3-12修改方案开通记录-方案开通记录ID不能为空", false);
        Assert.isNull(omsSchemeOpenRecord_2.getSubjectLifeCycle(), "D2-3发布方案开通记录(公共)-2-3-12修改方案开通记录-主体生命周期不能为空", false);
        bOOLEAN = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_2);


//virtualUsage 2-3-04查询配置方案详情  13785
        OmsConfScheme omsConfScheme = null;
        if (omsSchemeOpenRecord != null) {
            QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
            if (omsSchemeOpenRecord != null) {
                queryConfSchemeDetailReq.setConfSchemeId(omsSchemeOpenRecord.getConfSchemeId());//SimpleFieldAssign//sourceId:234342_1_13785
            }

            /*2-3-04查询配置方案详情[1923]   */
            Assert.isNull(queryConfSchemeDetailReq.getConfSchemeId(), "D2-3发布方案开通记录(公共)-2-3-04查询配置方案详情-配置方案ID 不能为空", false);
            omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq);


        }
        if ((omsConfScheme != null && omsConfScheme.getApplObjType() != null && omsConfScheme.getApplObjType().equals("TENANT_SPACE"))) {
            //if(2-3-04查询配置方案详情.应用对象类型 等于 租户空间)  13786

            AddApplexConrelComRespDto addApplexConrelComRespDto = null;
            if (omsConfScheme != null && omsSchemeOpenRecord != null) {
                AddApplexConrelComReqDto addApplexConrelComReqDto = new AddApplexConrelComReqDto();
                addApplexConrelComReqDto.setApplexType("TENANT_SPACE");//sourceId:234264_1_13787
                addApplexConrelComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:234262_1_13787
                addApplexConrelComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:234268_1_13787
                if (reqDto != null) {
                    addApplexConrelComReqDto.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:314812_1_13787
                }
                if (omsConfScheme != null) {
                    addApplexConrelComReqDto.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:379613_1_13787
                    addApplexConrelComReqDto.setIsInitialScheme(omsConfScheme.getIsInitialScheme());//SimpleFieldAssign//sourceId:312550_1_13787
                }
                if (omsSchemeOpenRecord != null) {
                    addApplexConrelComReqDto.setConfSchemeCode(omsSchemeOpenRecord.getConfSchemeCode());//SimpleFieldAssign//sourceId:234263_1_13787
                    addApplexConrelComReqDto.setApplexId(omsSchemeOpenRecord.getTenantSpaceId());//SimpleFieldAssign//sourceId:234265_1_13787
                    addApplexConrelComReqDto.setResultAspObjId(omsSchemeOpenRecord.getTenantSpaceId());//SimpleFieldAssign//sourceId:234261_1_13787
                    addApplexConrelComReqDto.setAscriptionSpaceId(omsSchemeOpenRecord.getTenantSpaceId());//SimpleFieldAssign//sourceId:234266_1_13787
                }

                /*D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）[3102]   */
                Assert.isNull(addApplexConrelComReqDto.getSchOpenRecordId(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-方案开通记录ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getConfSchemeCode(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-配置方案标识不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexType(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-应用实例类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexId(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-应用实例ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getResultAspObjType(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-答案归属对象类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getResultAspObjId(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-答案归属对象ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getIsInitialScheme(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-是否初始方案答案不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getAscriptionSpaceId(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-归属空间ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getSubjectLifeCycle(), "D2-3发布方案开通记录(公共)-D2-3新增应用实例配置关系（构建实例配置关系并克隆答案）-主体生命周期不能为空", false);
                addApplexConrelComRespDto = addApplexConrelCom(addApplexConrelComReqDto);


            }
//processBranchName:正常结束 ,processBranchId:13788

        } else {
            //else  13789

//processBranchName:正常结束 ,processBranchId:13790

        }
        ReleaseSchemeOpenRecordComRespDto retData = new ReleaseSchemeOpenRecordComRespDto();


        return retData;
    }

    /**
     * D2-3查开通记录详情等信息（公共）[2507]
     * gen by moon at 5/28/2023, 12:28:41 AM
     */
    @Trace(operationName = "D2-3查开通记录详情等信息（公共）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySchemeAuthInfoDetailComRespDto querySchemeAuthInfoDetailCom(QuerySchemeAuthInfoDetailComReqDto reqDto) {


        OmsSchemeOpenRecord omsSchemeOpenRecord_1 = null;
        OmsConfApplexRel omsConfApplexRel_1 = null;
//步骤0: 2-3-12查询方案开通记录详情 - querySchemeOpenRecordDetail
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:929631_1
            querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:987954_1
        }

        /*2-3-12查开通记录详情[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getSchOpenRecordId(), "D2-3查开通记录详情等信息（公共）-2-3-12查开通记录详情-开通钥匙ID不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        omsSchemeOpenRecord_1 = omsSchemeOpenRecord;

//步骤1: 2-3-13查询应用实例配置关系详情 - queryApplexConrelDetail
        OmsConfApplexRel omsConfApplexRel = null;
        if (omsSchemeOpenRecord != null) {
            QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
            if (reqDto != null) {
                queryApplexConrelDetailReq.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:929657_1
            }
            if (omsSchemeOpenRecord != null) {
                queryApplexConrelDetailReq.setConfSchemeId(omsSchemeOpenRecord.getConfSchemeId());//SimpleFieldAssign//sourceId:929654_1
                queryApplexConrelDetailReq.setAscriptionSpaceId(omsSchemeOpenRecord.getTenantSpaceId());//SimpleFieldAssign//sourceId:929644_1
            }

            /*2-3-13查使用关系详情[2122]   */
            Assert.isNull(queryApplexConrelDetailReq.getSchOpenRecordId(), "D2-3查开通记录详情等信息（公共）-2-3-13查使用关系详情- 开通钥匙ID不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getConfSchemeId(), "D2-3查开通记录详情等信息（公共）-2-3-13查使用关系详情-配置方案ID不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getAscriptionSpaceId(), "D2-3查开通记录详情等信息（公共）-2-3-13查使用关系详情-归属空间ID不能为空", false);
            omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            omsConfApplexRel_1 = omsConfApplexRel;
        }

        QuerySchemeAuthInfoDetailComRespDto retData = new QuerySchemeAuthInfoDetailComRespDto();
        if (omsSchemeOpenRecord_1 != null) {
            retData.setSchOpenRecordId(omsSchemeOpenRecord_1.getSchOpenRecordId());//SimpleFieldAssign//sourceId:77706_1
            retData.setSchOpenRecordCode(omsSchemeOpenRecord_1.getSchOpenRecordCode());//SimpleFieldAssign//sourceId:929674_1
            retData.setAuthorizationKeyTypeCode(omsSchemeOpenRecord_1.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:983647_1
            retData.setConfSchemeId(omsSchemeOpenRecord_1.getConfSchemeId());//SimpleFieldAssign//sourceId:929675_1
            retData.setAuthType(omsSchemeOpenRecord_1.getAuthType());//SimpleFieldAssign//sourceId:929677_1
            retData.setRemainingQty(omsSchemeOpenRecord_1.getRemainingQty());//SimpleFieldAssign//sourceId:929679_1
            retData.setAuthUnit(omsSchemeOpenRecord_1.getAuthUnit());//SimpleFieldAssign//sourceId:929678_1
            retData.setStartTime(omsSchemeOpenRecord_1.getStartTime());//SimpleFieldAssign//sourceId:929680_1
            retData.setEndTime(omsSchemeOpenRecord_1.getEndTime());//SimpleFieldAssign//sourceId:929681_1
            retData.setIsMainConfScheme(omsSchemeOpenRecord_1.getIsMainConfScheme());//SimpleFieldAssign//sourceId:929683_1
            retData.setTenantSpaceId(omsSchemeOpenRecord_1.getTenantSpaceId());//SimpleFieldAssign//sourceId:929682_1
        }
        if (omsConfApplexRel_1 != null) {
            retData.setApplexType(omsConfApplexRel_1.getApplexType());//SimpleFieldAssign//sourceId:929706_1
            retData.setApplexId(omsConfApplexRel_1.getApplexId());//SimpleFieldAssign//sourceId:929686_1
            retData.setApplexName(omsConfApplexRel_1.getApplexName());//SimpleFieldAssign//sourceId:929684_1
        }


        return retData;
    }

    /**
     * D2-3查询方案开通记录详情(公共)[2106]
     * gen by moon at 5/13/2023, 5:01:59 AM
     */
    @Trace(operationName = "D2-3查询方案开通记录详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySchemeOpenRecordDetailComRespDto querySchemeOpenRecordDetailCom(QuerySchemeOpenRecordDetailComReqDto reqDto) {


        OmsSchemeOpenRecord omsSchemeOpenRecord_1 = null;
        OmsConfScheme omsConfScheme_1 = null;
        OmsConfApplexRel omsConfApplexRel_1 = null;
//步骤0: 2-3-12查询方案开通记录详情 - querySchemeOpenRecordDetail
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:61051_1
            querySchemeOpenRecordDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:374746_1
            querySchemeOpenRecordDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:114599_1
            querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:114586_1
            querySchemeOpenRecordDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:114587_1
            querySchemeOpenRecordDetailReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:104143_1
        }

        /*2-3-12查询方案开通记录详情[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2-3查询方案开通记录详情(公共)-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        omsSchemeOpenRecord_1 = omsSchemeOpenRecord;

//步骤1: 2-3-04查询配置方案详情 - queryConfSchemeDetail
        OmsConfScheme omsConfScheme = null;
        if (omsSchemeOpenRecord != null) {
            QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
            if (omsSchemeOpenRecord != null) {
                queryConfSchemeDetailReq.setConfSchemeId(omsSchemeOpenRecord.getConfSchemeId());//SimpleFieldAssign//sourceId:61078_1
            }

            /*2-3-04查询配置方案详情[1923]   */
            Assert.isNull(queryConfSchemeDetailReq.getConfSchemeId(), "D2-3查询方案开通记录详情(公共)-2-3-04查询配置方案详情-配置方案ID 不能为空", false);
            omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            omsConfScheme_1 = omsConfScheme;
        }

//步骤2: 2-3-13查询应用实例配置关系详情 - queryApplexConrelDetail
        OmsConfApplexRel omsConfApplexRel = null;
        if (omsSchemeOpenRecord != null) {
            QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
            if (reqDto != null) {
                queryApplexConrelDetailReq.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:896197_1
                queryApplexConrelDetailReq.setAscriptionSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:896198_1
            }
            if (omsSchemeOpenRecord != null) {
                queryApplexConrelDetailReq.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:896212_1
                queryApplexConrelDetailReq.setConfSchemeId(omsSchemeOpenRecord.getConfSchemeId());//SimpleFieldAssign//sourceId:896208_1
            }

            /*2-3-13查使用关系ID[2122]   */
            Assert.isNull(queryApplexConrelDetailReq.getSchOpenRecordId(), "D2-3查询方案开通记录详情(公共)-2-3-13查使用关系ID-方案开通记录ID不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getConfSchemeId(), "D2-3查询方案开通记录详情(公共)-2-3-13查使用关系ID-配置方案ID不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getAscriptionSpaceId(), "D2-3查询方案开通记录详情(公共)-2-3-13查使用关系ID-归属空间ID不能为空", false);
            omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            omsConfApplexRel_1 = omsConfApplexRel;
        }

        QuerySchemeOpenRecordDetailComRespDto retData = new QuerySchemeOpenRecordDetailComRespDto();
        if (omsSchemeOpenRecord_1 != null) {
            retData.setSchOpenRecordId(omsSchemeOpenRecord_1.getSchOpenRecordId());//SimpleFieldAssign//sourceId:61102_1
            retData.setApplObjType(omsSchemeOpenRecord_1.getApplObjType());//SimpleFieldAssign//sourceId:932193_1
            retData.setConfSchemeId(omsSchemeOpenRecord_1.getConfSchemeId());//SimpleFieldAssign//sourceId:61104_1
            retData.setConfSchemeCode(omsSchemeOpenRecord_1.getConfSchemeCode());//SimpleFieldAssign//sourceId:104147_1
            retData.setAuthType(omsSchemeOpenRecord_1.getAuthType());//SimpleFieldAssign//sourceId:896078_1
            retData.setRemainingQty(omsSchemeOpenRecord_1.getRemainingQty());//SimpleFieldAssign//sourceId:61114_1
            retData.setAuthUnit(omsSchemeOpenRecord_1.getAuthUnit());//SimpleFieldAssign//sourceId:896079_1
            retData.setStartTime(omsSchemeOpenRecord_1.getStartTime());//SimpleFieldAssign//sourceId:61116_1
            retData.setEndTime(omsSchemeOpenRecord_1.getEndTime());//SimpleFieldAssign//sourceId:61118_1
            retData.setIsMainConfScheme(omsSchemeOpenRecord_1.getIsMainConfScheme());//SimpleFieldAssign//sourceId:82749_1
            retData.setAuthUseType(omsSchemeOpenRecord_1.getAuthUseType());//SimpleFieldAssign//sourceId:315467_1
            retData.setSubjectLifeCycle(omsSchemeOpenRecord_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:61120_1
            retData.setOperationInductionId(omsSchemeOpenRecord_1.getOperationInductionId());//SimpleFieldAssign//sourceId:61121_1
            retData.setOperateTime(omsSchemeOpenRecord_1.getOperateTime());//SimpleFieldAssign//sourceId:61122_1
        }
        if (omsConfScheme_1 != null) {
            retData.setApplObjType(omsConfScheme_1.getApplObjType());//SimpleFieldAssign//sourceId:61110_1
            retData.setConfSchemeName(omsConfScheme_1.getConfSchemeName());//SimpleFieldAssign//sourceId:61106_1
            retData.setConfSchemeTypeCode(omsConfScheme_1.getConfSchemeTypeCode());//SimpleFieldAssign//sourceId:61113_1
            retData.setIsCustom(omsConfScheme_1.getIsCustom());//SimpleFieldAssign//sourceId:61117_1
            retData.setIsOpenCustomConf(omsConfScheme_1.getIsOpenCustomConf());//SimpleFieldAssign//sourceId:61119_1
            retData.setIsInitialScheme(omsConfScheme_1.getIsInitialScheme());//SimpleFieldAssign//sourceId:61115_1
            retData.setBizSceneCode(omsConfScheme_1.getBizSceneCode());//SimpleFieldAssign//sourceId:82675_1
            retData.setConfSchemeDes(omsConfScheme_1.getConfSchemeDes());//SimpleFieldAssign//sourceId:61108_1
        }
        if (omsConfApplexRel_1 != null) {
            retData.setApplexRelId(omsConfApplexRel_1.getApplexRelId());//SimpleFieldAssign//sourceId:896214_1
            retData.setApplexId(omsConfApplexRel_1.getApplexId());//SimpleFieldAssign//sourceId:896464_1
        }


        return retData;
    }

    /**
     * D2-3新增开通记录(公共)[2116]
     * gen by moon at 6/11/2023, 1:22:03 AM
     */
    @Trace(operationName = "D2-3新增开通记录(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddSchemeOpenRecordComRespDto addSchemeOpenRecordCom(AddSchemeOpenRecordComReqDto reqDto) {


        ObtainReceiveFieldsRespDto receptionServiceRes_1 = null;
//virtualUsage 2-3-12查开通记录是否存在  39847
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        querySchemeOpenRecordDetailReq.setIsArchive("FALSE");//sourceId:893326_1_39847
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:893322_1_39847
            querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:893324_1_39847
        }

        /*2-3-12查开通记录是否存在[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getConfSchemeId(), "D2-3新增开通记录(公共)-2-3-12查开通记录是否存在-配置方案ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2-3新增开通记录(公共)-2-3-12查开通记录是否存在-租户空间ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getIsArchive(), "D2-3新增开通记录(公共)-2-3-12查开通记录是否存在-是否存档不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((omsSchemeOpenRecord == null)) {
            //if(2-3-12查开通记录是否存在.出参 值等于空 )  39848

            if ((reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("QUANTITY"))) {
                //if(D2-3新增方案开通记录(公共).授权类型 等于 数量型)  39850

                String string = null;
                OmsSchemeOpenRecord omsSchemeOpenRecord_2 = new OmsSchemeOpenRecord();
                omsSchemeOpenRecord_2.setAuthUseType("USABLE");//sourceId:79450_1_39854
                if (reqDto != null) {
                    omsSchemeOpenRecord_2.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:61265_1_39854
                    omsSchemeOpenRecord_2.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:61266_1_39854
                    omsSchemeOpenRecord_2.setApplObjType(reqDto.getApplObjType());//SimpleFieldAssign//sourceId:931047_1_39854
                    omsSchemeOpenRecord_2.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932169_1_39854
                    omsSchemeOpenRecord_2.setAuthType(reqDto.getAuthType());//SimpleFieldAssign//sourceId:79448_1_39854
                    omsSchemeOpenRecord_2.setRemainingQty(reqDto.getAuthorizationNum());//SimpleFieldAssign//sourceId:63052_1_39854
                    omsSchemeOpenRecord_2.setAuthUnit(reqDto.getAuthUnit());//SimpleFieldAssign//sourceId:79449_1_39854
                    omsSchemeOpenRecord_2.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:80726_1_39854
                    omsSchemeOpenRecord_2.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:61267_1_39854
                    omsSchemeOpenRecord_2.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:61271_1_39854
                }

                /*2-3-12新增开通记录[1951]   */
                Assert.isNull(omsSchemeOpenRecord_2.getConfSchemeId(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-配置方案ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getConfSchemeCode(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-配置方案标识不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getApplObjType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-开通对象类型编码不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getAuthorizationKeyTypeCode(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-开通钥匙类型标识不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getAuthType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-授权类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getAuthUseType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-授权使用类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getIsMainConfScheme(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-是否主配置方案不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getTenantSpaceId(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-租户空间ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getSubjectLifeCycle(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-主体生命周期不能为空", false);
                string = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord_2)/*vcase invoke 本地 method 方法调用;*/;


//ModelCode: receptionService
                ObtainReceiveFieldsRespDto receptionServiceRes = null;
                if (string != null) {
                    ObtainReceiveFieldsReqDto receptionServiceReq = new ObtainReceiveFieldsReqDto();
                    if (string != null) {
                        receptionServiceReq.setSchOpenRecordId(string);//SimpleFieldAssign//sourceId:893886_1_39868
                    }

                    /*M2-接收开通记录ID[4007]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq.getSchOpenRecordId(), "D2-3新增开通记录(公共)-M2-接收开通记录ID-开通钥匙ID不能为空", false);
                    receptionServiceRes = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq);


                    receptionServiceRes_1 = receptionServiceRes;
                }
            } else if ((reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("CYCLE_TIME"))) {
                //elseif(D2-3新增方案开通记录(公共).授权类型 等于 周期时间型)  39852

                ImplementCountTimeScopeServiceComRespDto implementCountTimeScopeServiceComRespDto = null;
                ImplementCountTimeScopeServiceComReqDto implementCountTimeScopeServiceComReqDto = new ImplementCountTimeScopeServiceComReqDto();

                if (reqDto != null) {
                    implementCountTimeScopeServiceComReqDto.setComTimeField1(reqDto.getStartTime());//SimpleFieldAssign//sourceId:900681_1_39855
                    implementCountTimeScopeServiceComReqDto.setComNumField(reqDto.getAuthorizationNum());//SimpleFieldAssign//sourceId:489922_1_39855
                    implementCountTimeScopeServiceComReqDto.setCycleTypeCode(reqDto.getAuthUnit());//SimpleFieldAssign//sourceId:489923_1_39855
                }


                /*D2-获取授权开始及结束时间[5409]   */
                Assert.isNull(implementCountTimeScopeServiceComReqDto.getComTimeField1(), "D2-3新增开通记录(公共)-D2-获取授权开始及结束时间-通用时间字段1不能为空", false);
                Assert.isNull(implementCountTimeScopeServiceComReqDto.getComNumField(), "D2-3新增开通记录(公共)-D2-获取授权开始及结束时间-通用数值字段（整数型）不能为空", false);
                Assert.isNull(implementCountTimeScopeServiceComReqDto.getCycleTypeCode(), "D2-3新增开通记录(公共)-D2-获取授权开始及结束时间-周期类型标识不能为空", false);
                implementCountTimeScopeServiceComRespDto = interfaceModeService.implementCountTimeScopeServiceCom(implementCountTimeScopeServiceComReqDto)/*vcase invoke isSameApp*/;


                CheckTimeScopeSearchComRespDto checkTimeScopeSearchComRespDto = null;
                if (implementCountTimeScopeServiceComRespDto != null) {
                    CheckTimeScopeSearchComReqDto checkTimeScopeSearchComReqDto = new CheckTimeScopeSearchComReqDto();
                    if (reqDto != null) {
                        checkTimeScopeSearchComReqDto.setCurrentTime(reqDto.getStartTime());//SimpleFieldAssign//sourceId:461226_1_39856
                    }
                    if (implementCountTimeScopeServiceComRespDto != null) {
                        checkTimeScopeSearchComReqDto.setCompareTime(implementCountTimeScopeServiceComRespDto.getEndTime());//SimpleFieldAssign//sourceId:461228_1_39856
                    }

                    /*D2检查时间范围查询(公共)[3297]   */
                    Assert.isNull(checkTimeScopeSearchComReqDto.getCurrentTime(), "D2-3新增开通记录(公共)-D2检查时间范围查询(公共)-当前时间不能为空", false);
                    Assert.isNull(checkTimeScopeSearchComReqDto.getCompareTime(), "D2-3新增开通记录(公共)-D2检查时间范围查询(公共)-比较时间不能为空", false);
                    checkTimeScopeSearchComRespDto = divineDataService.checkTimeScopeSearchCom(checkTimeScopeSearchComReqDto)/*vcase invoke isSameApp*/;


                }
                if ((checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("BEFORE"))) {
                    //if(D2判断结束时间是否过期.时间比较结果 等于 之前（小于）)  39860

                    String string_2 = null;
                    if (implementCountTimeScopeServiceComRespDto != null) {
                        OmsSchemeOpenRecord omsSchemeOpenRecord_3 = new OmsSchemeOpenRecord();
                        omsSchemeOpenRecord_3.setAuthUseType("USABLE");//sourceId:79450_1_39861
                        if (reqDto != null) {
                            omsSchemeOpenRecord_3.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:61265_1_39861
                            omsSchemeOpenRecord_3.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:61266_1_39861
                            omsSchemeOpenRecord_3.setApplObjType(reqDto.getApplObjType());//SimpleFieldAssign//sourceId:931047_1_39861
                            omsSchemeOpenRecord_3.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932169_1_39861
                            omsSchemeOpenRecord_3.setAuthType(reqDto.getAuthType());//SimpleFieldAssign//sourceId:79448_1_39861
                            omsSchemeOpenRecord_3.setRemainingQty(reqDto.getAuthorizationNum());//SimpleFieldAssign//sourceId:63052_1_39861
                            omsSchemeOpenRecord_3.setAuthUnit(reqDto.getAuthUnit());//SimpleFieldAssign//sourceId:79449_1_39861
                            omsSchemeOpenRecord_3.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:80726_1_39861
                            omsSchemeOpenRecord_3.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:61267_1_39861
                            omsSchemeOpenRecord_3.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:61271_1_39861
                        }
                        if (implementCountTimeScopeServiceComRespDto != null) {
                            omsSchemeOpenRecord_3.setStartTime(implementCountTimeScopeServiceComRespDto.getStartTime());//SimpleFieldAssign//sourceId:79443_1_39861
                            omsSchemeOpenRecord_3.setEndTime(implementCountTimeScopeServiceComRespDto.getEndTime());//SimpleFieldAssign//sourceId:79444_1_39861
                        }

                        /*2-3-12新增开通记录[1951]   */
                        Assert.isNull(omsSchemeOpenRecord_3.getConfSchemeId(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-配置方案ID不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getConfSchemeCode(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-配置方案标识不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getApplObjType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-开通对象类型编码不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getAuthorizationKeyTypeCode(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-开通钥匙类型标识不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getAuthType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-授权类型不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getAuthUseType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-授权使用类型不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getIsMainConfScheme(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-是否主配置方案不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getTenantSpaceId(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-租户空间ID不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getSubjectLifeCycle(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-主体生命周期不能为空", false);
                        string_2 = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord_3)/*vcase invoke 本地 method 方法调用;*/;


                    }
//ModelCode: receptionService
                    ObtainReceiveFieldsRespDto receptionServiceRes_2 = null;
                    if (string_2 != null) {
                        ObtainReceiveFieldsReqDto receptionServiceReq_1 = new ObtainReceiveFieldsReqDto();
                        if (string_2 != null) {
                            receptionServiceReq_1.setSchOpenRecordId(string_2);//SimpleFieldAssign//sourceId:893886_1_39869
                        }

                        /*M2-接收开通记录ID[4007]  用于特殊方法接收上游入参。 */
                        Assert.isNull(receptionServiceReq_1.getSchOpenRecordId(), "D2-3新增开通记录(公共)-M2-接收开通记录ID-开通钥匙ID不能为空", false);
                        receptionServiceRes_2 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_1);


                        receptionServiceRes_1 = receptionServiceRes_2;
                    }
                } else {
                    //else  40763

//异常结束 40764
                    throw new BizException("220200159", "对不起！授权时间不满足，请确认后重试~", false);
                }
            } else if ((reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("FIXED_TIME"))) {
                //elseif(D2-3新增方案开通记录(公共).授权类型 等于 固定时间型)  39853

                CheckTimeScopeSearchComRespDto checkTimeScopeSearchComRespDto_2 = null;
                CheckTimeScopeSearchComReqDto checkTimeScopeSearchComReqDto_1 = new CheckTimeScopeSearchComReqDto();
                if (reqDto != null) {
                    checkTimeScopeSearchComReqDto_1.setCurrentTime(reqDto.getStartTime());//SimpleFieldAssign//sourceId:461226_1_39863
                    checkTimeScopeSearchComReqDto_1.setCompareTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:461228_1_39863
                }

                /*D2检查时间范围查询(公共)[3297]   */
                Assert.isNull(checkTimeScopeSearchComReqDto_1.getCurrentTime(), "D2-3新增开通记录(公共)-D2检查时间范围查询(公共)-当前时间不能为空", false);
                Assert.isNull(checkTimeScopeSearchComReqDto_1.getCompareTime(), "D2-3新增开通记录(公共)-D2检查时间范围查询(公共)-比较时间不能为空", false);
                checkTimeScopeSearchComRespDto_2 = divineDataService.checkTimeScopeSearchCom(checkTimeScopeSearchComReqDto_1)/*vcase invoke isSameApp*/;


                if ((checkTimeScopeSearchComRespDto_2 != null && checkTimeScopeSearchComRespDto_2.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto_2.getTimeCompareResult().equals("BEFORE"))) {
                    //if(D2判断结束时间是否过期.时间比较结果 等于 之前（小于）)  39864

                    String string_3 = null;
                    OmsSchemeOpenRecord omsSchemeOpenRecord_4 = new OmsSchemeOpenRecord();
                    omsSchemeOpenRecord_4.setAuthUseType("USABLE");//sourceId:79450_1_39866
                    if (reqDto != null) {
                        omsSchemeOpenRecord_4.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:61265_1_39866
                        omsSchemeOpenRecord_4.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:61266_1_39866
                        omsSchemeOpenRecord_4.setApplObjType(reqDto.getApplObjType());//SimpleFieldAssign//sourceId:931047_1_39866
                        omsSchemeOpenRecord_4.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932169_1_39866
                        omsSchemeOpenRecord_4.setAuthType(reqDto.getAuthType());//SimpleFieldAssign//sourceId:79448_1_39866
                        omsSchemeOpenRecord_4.setStartTime(reqDto.getStartTime());//SimpleFieldAssign//sourceId:79443_1_39866
                        omsSchemeOpenRecord_4.setEndTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:79444_1_39866
                        omsSchemeOpenRecord_4.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:80726_1_39866
                        omsSchemeOpenRecord_4.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:61267_1_39866
                        omsSchemeOpenRecord_4.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:61271_1_39866
                    }

                    /*2-3-12新增开通记录[1951]   */
                    Assert.isNull(omsSchemeOpenRecord_4.getConfSchemeId(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-配置方案ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getConfSchemeCode(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-配置方案标识不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getApplObjType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-开通对象类型编码不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getAuthorizationKeyTypeCode(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-开通钥匙类型标识不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getAuthType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-授权类型不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getAuthUseType(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-授权使用类型不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getIsMainConfScheme(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-是否主配置方案不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getTenantSpaceId(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-租户空间ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_4.getSubjectLifeCycle(), "D2-3新增开通记录(公共)-2-3-12新增开通记录-主体生命周期不能为空", false);
                    string_3 = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord_4)/*vcase invoke 本地 method 方法调用;*/;


//ModelCode: receptionService
                    ObtainReceiveFieldsRespDto receptionServiceRes_3 = null;
                    if (string_3 != null) {
                        ObtainReceiveFieldsReqDto receptionServiceReq_2 = new ObtainReceiveFieldsReqDto();
                        if (string_3 != null) {
                            receptionServiceReq_2.setSchOpenRecordId(string_3);//SimpleFieldAssign//sourceId:893886_1_39870
                        }

                        /*M2-接收开通记录ID[4007]  用于特殊方法接收上游入参。 */
                        Assert.isNull(receptionServiceReq_2.getSchOpenRecordId(), "D2-3新增开通记录(公共)-M2-接收开通记录ID-开通钥匙ID不能为空", false);
                        receptionServiceRes_3 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_2);


                        receptionServiceRes_1 = receptionServiceRes_3;
                    }
                } else {
                    //else  40761

//异常结束 40762
                    throw new BizException("220200159", "对不起！授权时间不满足，请确认后重试~", false);
                }
            }
        } else if ((omsSchemeOpenRecord != null)) {
            //elseif(2-3-12查开通记录是否存在.出参 值不等于空 )  39871

//ModelCode: receptionService
            ObtainReceiveFieldsRespDto receptionServiceRes_4 = null;
            if (omsSchemeOpenRecord != null) {
                ObtainReceiveFieldsReqDto receptionServiceReq_3 = new ObtainReceiveFieldsReqDto();
                if (omsSchemeOpenRecord != null) {
                    receptionServiceReq_3.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:893886_1_39872
                }

                /*M2-接收开通记录ID[4007]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_3.getSchOpenRecordId(), "D2-3新增开通记录(公共)-M2-接收开通记录ID-开通钥匙ID不能为空", false);
                receptionServiceRes_4 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_3);


                receptionServiceRes_1 = receptionServiceRes_4;
            }
        }
        AddSchemeOpenRecordComRespDto retData = new AddSchemeOpenRecordComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setSchOpenRecordId(receptionServiceRes_1.getSchOpenRecordId());//SimpleFieldAssign//sourceId:894119_1
        }


        return retData;
    }

    /**
     * D2-3查询方案授权情况(公共)[4584]
     * gen by moon at 5/6/2023, 4:59:39 PM
     */
    @Trace(operationName = "D2-3查询方案授权情况(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySchemeImpowerCaseDetailComRespDto querySchemeImpowerCaseDetailCom(QuerySchemeImpowerCaseDetailComReqDto reqDto) {


        ObtainReceiveFieldsRespDto receptionServiceRes_3 = null;
        QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_3 = null;
        QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_5 = null;
//virtualUsage D2-3查是否开启安全访问答案  16519
        QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
        QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new QueryConfItemMatchAnswerDetailComReqDto();
        queryConfItemMatchAnswerDetailComReqDto.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:333639_1_16519
        queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("IS_OPEN_SAFETY_VISIT");//CUSTOM_CONVENTION//sourceId:333636_1_16519
        queryConfItemMatchAnswerDetailComReqDto.setIsPlatData("TRUE");//sourceId:333645_1_16519

        /*D2-3查是否开启安全访问答案[2486]   */
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfSchemeCode(), "D2-3查询方案授权情况(公共)-D2-3查是否开启安全访问答案-配置方案标识不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(), "D2-3查询方案授权情况(公共)-D2-3查是否开启安全访问答案-配置项标识不能为空", false);
        queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto)/*vcase invoke isSameApp*/;


//virtualUsage M2-获取接收字段  16538
        //ModelCode: receptionService
        ObtainReceiveFieldsRespDto receptionServiceRes = null;
        if (queryConfItemMatchAnswerDetailComRespDto != null) {
            ObtainReceiveFieldsReqDto receptionServiceReq = new ObtainReceiveFieldsReqDto();
            if (queryConfItemMatchAnswerDetailComRespDto != null) {
                receptionServiceReq.setIsOpenSafetyVisit(queryConfItemMatchAnswerDetailComRespDto.getEndValue());//SimpleFieldAssign//sourceId:333684_1_16538
            }

            /*M2-获取接收字段[4007]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getIsOpenSafetyVisit(), "D2-3查询方案授权情况(公共)-M2-获取接收字段-是否开启安全访问 不能为空", false);
            receptionServiceRes = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq);


        }
        if ((receptionServiceRes != null && receptionServiceRes.getIsOpenSafetyVisit() != null && receptionServiceRes.getIsOpenSafetyVisit().equals("FALSE"))) {
            //if(M2-获取接收字段.是否开启安全访问  等于 否)  16520

            QuerySchemeOpenRecordDetailComRespDto querySchemeOpenRecordDetailComRespDto = null;
            QuerySchemeOpenRecordDetailComReqDto querySchemeOpenRecordDetailComReqDto = new QuerySchemeOpenRecordDetailComReqDto();
            querySchemeOpenRecordDetailComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:333603_1_16524
            querySchemeOpenRecordDetailComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:333604_1_16524
            if (reqDto != null) {
                querySchemeOpenRecordDetailComReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:333605_1_16524
            }

            /*D2-3查询方案开通记录详情(公共)[2106]   */
            Assert.isNull(querySchemeOpenRecordDetailComReqDto.getConfSchemeCode(), "D2-3查询方案授权情况(公共)-D2-3查询方案开通记录详情(公共)-配置方案标识不能为空", false);
            Assert.isNull(querySchemeOpenRecordDetailComReqDto.getTenantSpaceId(), "D2-3查询方案授权情况(公共)-D2-3查询方案开通记录详情(公共)-租户空间ID不能为空", false);
            Assert.isNull(querySchemeOpenRecordDetailComReqDto.getSubjectLifeCycle(), "D2-3查询方案授权情况(公共)-D2-3查询方案开通记录详情(公共)-主体生命周期不能为空", false);
            querySchemeOpenRecordDetailComRespDto = querySchemeOpenRecordDetailCom(querySchemeOpenRecordDetailComReqDto)/*vcase invoke 同服务,同domain*/;


            if ((querySchemeOpenRecordDetailComRespDto != null && querySchemeOpenRecordDetailComRespDto.getSchOpenRecordId() == null)) {
                //if(D2-3查询方案开通记录详情(公共).方案开通记录ID 值等于空 )  40062

//异常结束 40063
                throw new BizException("200223", "对不起！授权异常，请联系系统管理员~", false);
            }
            if ((querySchemeOpenRecordDetailComRespDto != null && querySchemeOpenRecordDetailComRespDto.getAuthUseType() != null && querySchemeOpenRecordDetailComRespDto.getAuthUseType().equals("USABLE"))) {
                //if(D2-3查询方案开通记录详情(公共).授权使用类型 等于 可用)  16525

//ModelCode: receptionService
                ObtainReceiveFieldsRespDto receptionServiceRes_2 = null;
                ObtainReceiveFieldsReqDto receptionServiceReq_1 = new ObtainReceiveFieldsReqDto();
                receptionServiceReq_1.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:375824_1_16541

                /*M2-允许操作[4007]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_1.getOutputNum(), "D2-3查询方案授权情况(公共)-M2-允许操作-传输数值（整数型）不能为空", false);
                receptionServiceRes_2 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_1);


                receptionServiceRes_3 = receptionServiceRes_2;
//processBranchName:正常结束 ,processBranchId:16531

            } else if ((querySchemeOpenRecordDetailComRespDto != null && querySchemeOpenRecordDetailComRespDto.getAuthUseType() != null && querySchemeOpenRecordDetailComRespDto.getAuthUseType().equals("QUANTITY_INS_DISABLED"))) {
                //elseif(D2-3查询方案开通记录详情(公共).授权使用类型 等于 数量不足不可用)  16529

                QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_2 = null;
                QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_1 = new QueryConfItemMatchAnswerDetailComReqDto();
                queryConfItemMatchAnswerDetailComReqDto_1.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:333660_1_16530
                queryConfItemMatchAnswerDetailComReqDto_1.setConfItemCode("IMPOWER_QUANTITY_LACK_UNUSABLE");//CUSTOM_CONVENTION//sourceId:333657_1_16530
                queryConfItemMatchAnswerDetailComReqDto_1.setIsPlatData("TRUE");//sourceId:333666_1_16530

                /*D2-3查授权数量不足不可用文案[2486]   */
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfSchemeCode(), "D2-3查询方案授权情况(公共)-D2-3查授权数量不足不可用文案-配置方案标识不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfItemCode(), "D2-3查询方案授权情况(公共)-D2-3查授权数量不足不可用文案-配置项标识不能为空", false);
                queryConfItemMatchAnswerDetailComRespDto_2 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_1)/*vcase invoke isSameApp*/;


                queryConfItemMatchAnswerDetailComRespDto_3 = queryConfItemMatchAnswerDetailComRespDto_2;
//processBranchName:正常结束 ,processBranchId:16532

            } else if ((querySchemeOpenRecordDetailComRespDto != null && querySchemeOpenRecordDetailComRespDto.getAuthUseType() != null && querySchemeOpenRecordDetailComRespDto.getAuthUseType().equals("EXPIRE__DISABLED"))) {
                //elseif(D2-3查询方案开通记录详情(公共).授权使用类型 等于 到期不可用)  16534

                QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_4 = null;
                QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_2 = new QueryConfItemMatchAnswerDetailComReqDto();
                queryConfItemMatchAnswerDetailComReqDto_2.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:333650_1_16542
                queryConfItemMatchAnswerDetailComReqDto_2.setConfItemCode("IMPOWER_EXPIRE_UNUSABLE");//CUSTOM_CONVENTION//sourceId:333647_1_16542
                queryConfItemMatchAnswerDetailComReqDto_2.setIsPlatData("TRUE");//sourceId:333656_1_16542

                /*D2-3查授权到期不可用文案[2486]   */
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getConfSchemeCode(), "D2-3查询方案授权情况(公共)-D2-3查授权到期不可用文案-配置方案标识不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_2.getConfItemCode(), "D2-3查询方案授权情况(公共)-D2-3查授权到期不可用文案-配置项标识不能为空", false);
                queryConfItemMatchAnswerDetailComRespDto_4 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_2)/*vcase invoke isSameApp*/;


                queryConfItemMatchAnswerDetailComRespDto_5 = queryConfItemMatchAnswerDetailComRespDto_4;
//processBranchName:正常结束 ,processBranchId:16544

            }
        } else if ((receptionServiceRes != null && receptionServiceRes.getIsOpenSafetyVisit() != null && receptionServiceRes.getIsOpenSafetyVisit().equals("TRUE"))) {
            //elseif(M2-获取接收字段.是否开启安全访问  等于 是)  16536

            JudgeConfSchemeUsableCaseComRespDto judgeConfSchemeUsableCaseComRespDto = null;
            JudgeConfSchemeUsableCaseComReqDto judgeConfSchemeUsableCaseComReqDto = new JudgeConfSchemeUsableCaseComReqDto();


            /*D2-判断配置方案可用情况(公共)[4684]   */

            judgeConfSchemeUsableCaseComRespDto = confSchemeService.judgeConfSchemeUsableCaseCom(judgeConfSchemeUsableCaseComReqDto)/*vcase invoke isSameApp*/;


//processBranchName:正常结束 ,processBranchId:16537

        } else if ((queryConfItemMatchAnswerDetailComRespDto != null && queryConfItemMatchAnswerDetailComRespDto.getOptionResultId() == null)) {
            //elseif(D2-3查是否开启安全访问答案.答案ID 值等于空 )  16539

//异常结束 16540
            throw new BizException("C00028", "对不起，没有数据！！", false);
        }
        QuerySchemeImpowerCaseDetailComRespDto retData = new QuerySchemeImpowerCaseDetailComRespDto();
        if (queryConfItemMatchAnswerDetailComRespDto_5 != null) {
            retData.setOptionResultId(queryConfItemMatchAnswerDetailComRespDto_5.getOptionResultId());//SimpleFieldAssign//sourceId:333718_1
            retData.setEndValue(queryConfItemMatchAnswerDetailComRespDto_5.getEndValue());//SimpleFieldAssign//sourceId:333719_1
        }
        if (queryConfItemMatchAnswerDetailComRespDto_3 != null) {
            retData.setOptionResultId(queryConfItemMatchAnswerDetailComRespDto_3.getOptionResultId());//SimpleFieldAssign//sourceId:333718_1
            retData.setEndValue(queryConfItemMatchAnswerDetailComRespDto_3.getEndValue());//SimpleFieldAssign//sourceId:333719_1
        }
        if (receptionServiceRes_3 != null) {
            retData.setOutputNum(receptionServiceRes_3.getOutputNum());//SimpleFieldAssign//sourceId:374679_1
        }


        return retData;
    }

    /**
     * D2-3新增模板方案配置关系[4619]
     * gen by moon at 10/1/2022, 11:40:22 PM
     */
    @Trace(operationName = "D2-3新增模板方案配置关系")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddTempSchemeConrelRespDto addTempSchemeConrel(AddTempSchemeConrelReqDto reqDto) {


        //virtualUsage D2-3查询方案开通记录详情(公共)  16620
        QuerySchemeOpenRecordDetailComRespDto querySchemeOpenRecordDetailComRespDto = null;
        QuerySchemeOpenRecordDetailComReqDto querySchemeOpenRecordDetailComReqDto = new QuerySchemeOpenRecordDetailComReqDto();
        querySchemeOpenRecordDetailComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:335588_1_16620
        querySchemeOpenRecordDetailComReqDto.setIsArchive("FALSE");//sourceId:335586_1_16620
        if (reqDto != null) {
            querySchemeOpenRecordDetailComReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:335590_1_16620
        }

        /*D2-3查询方案开通记录详情(公共)[2106]   */
        Assert.isNull(querySchemeOpenRecordDetailComReqDto.getConfSchemeCode(), "D2-3新增模板方案配置关系-D2-3查询方案开通记录详情(公共)-配置方案标识不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailComReqDto.getTenantSpaceId(), "D2-3新增模板方案配置关系-D2-3查询方案开通记录详情(公共)-租户空间ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailComReqDto.getIsArchive(), "D2-3新增模板方案配置关系-D2-3查询方案开通记录详情(公共)-是否存档不能为空", false);
        querySchemeOpenRecordDetailComRespDto = querySchemeOpenRecordDetailCom(querySchemeOpenRecordDetailComReqDto);


        if ((querySchemeOpenRecordDetailComRespDto != null && querySchemeOpenRecordDetailComRespDto.getSchOpenRecordId() == null)) {
            //if(D2-3查询方案开通记录详情(公共).方案开通记录ID 值等于空 )  16621

            OmsConfScheme omsConfScheme = null;
            QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
            queryConfSchemeDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:335621_1_16628
            if (reqDto != null) {
                queryConfSchemeDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:335603_1_16628
            }

            /*2-3-04查询配置方案详情[1923]   */
            Assert.isNull(queryConfSchemeDetailReq.getConfSchemeCode(), "D2-3新增模板方案配置关系-2-3-04查询配置方案详情-配置方案标识不能为空", false);
            Assert.isNull(queryConfSchemeDetailReq.getSubjectLifeCycle(), "D2-3新增模板方案配置关系-2-3-04查询配置方案详情-生命周期状态不能为空", false);
            omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq);
            Assert.isTrue(omsConfScheme == null || omsConfScheme.getConfSchemeId() == null, "返回值不能为空", false);


            AddSchemeOpenRecordComRespDto addSchemeOpenRecordComRespDto = null;
            if (omsConfScheme != null) {
                AddSchemeOpenRecordComReqDto addSchemeOpenRecordComReqDto = new AddSchemeOpenRecordComReqDto();
                // addSchemeOpenRecordComReqDto.setApplexType("EVA_TEMP");//sourceId:335536_1_16627
//addSchemeOpenRecordComReqDto.setResultAspObjType("EVA_TEMP");//sourceId:335538_1_16627
                addSchemeOpenRecordComReqDto.setIsMainConfScheme("TRUE");//sourceId:335539_1_16627
                addSchemeOpenRecordComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:335540_1_16627
                addSchemeOpenRecordComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:335541_1_16627
//addSchemeOpenRecordComReqDto.setIsAllowOpt("TRUE");//sourceId:335542_1_16627
                if (omsConfScheme != null) {
                    addSchemeOpenRecordComReqDto.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:335531_1_16627
                }
                if (reqDto != null) {
                    // addSchemeOpenRecordComReqDto.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:335535_1_16627
//addSchemeOpenRecordComReqDto.setResultAspObjId(reqDto.getResultAspObjId());//SimpleFieldAssign//sourceId:335537_1_16627
                }

                /*D2-3新增方案开通记录(公共)[2116]   */
                Assert.isNull(addSchemeOpenRecordComReqDto.getConfSchemeId(), "D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-配置方案ID不能为空", false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getApplexId(),"D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-应用实例ID不能为空",false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getApplexType(),"D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-应用实例类型不能为空",false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getResultAspObjId(),"D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-答案归属对象ID不能为空",false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getResultAspObjType(),"D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-答案归属对象类型不能为空",false);
                Assert.isNull(addSchemeOpenRecordComReqDto.getIsMainConfScheme(), "D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-是否主配置方案不能为空", false);
                Assert.isNull(addSchemeOpenRecordComReqDto.getTenantSpaceId(), "D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-租户空间ID不能为空", false);
                Assert.isNull(addSchemeOpenRecordComReqDto.getSubjectLifeCycle(), "D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-主体生命周期不能为空", false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getIsAllowOpt(),"D2-3新增模板方案配置关系-D2-3新增方案开通记录(公共)-是否允许操作不能为空",false);
                addSchemeOpenRecordComRespDto = addSchemeOpenRecordCom(addSchemeOpenRecordComReqDto);


            }
//processBranchName:正常结束 ,processBranchId:16623

        } else if ((querySchemeOpenRecordDetailComRespDto != null && querySchemeOpenRecordDetailComRespDto.getSchOpenRecordId() != null)) {
            //elseif(D2-3查询方案开通记录详情(公共).方案开通记录ID 值不等于空 )  16624

            AddApplexConrelComRespDto addApplexConrelComRespDto = null;
            if (querySchemeOpenRecordDetailComRespDto != null) {
                AddApplexConrelComReqDto addApplexConrelComReqDto = new AddApplexConrelComReqDto();
                addApplexConrelComReqDto.setApplexType("EVA_TEMP");//sourceId:335524_1_16625
                addApplexConrelComReqDto.setResultAspObjType("EVA_TEMP");//sourceId:335522_1_16625
                addApplexConrelComReqDto.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:335526_1_16625
                addApplexConrelComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:335528_1_16625
                if (querySchemeOpenRecordDetailComRespDto != null) {
                    addApplexConrelComReqDto.setSchOpenRecordId(querySchemeOpenRecordDetailComRespDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:335530_1_16625
                    addApplexConrelComReqDto.setConfSchemeCode(querySchemeOpenRecordDetailComRespDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:335523_1_16625
                    addApplexConrelComReqDto.setIsInitialScheme(querySchemeOpenRecordDetailComRespDto.getIsInitialScheme());//SimpleFieldAssign//sourceId:335529_1_16625
                    addApplexConrelComReqDto.setConfSchemeId(querySchemeOpenRecordDetailComRespDto.getConfSchemeId());
                }
                if (reqDto != null) {
                    addApplexConrelComReqDto.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:335525_1_16625
                    addApplexConrelComReqDto.setResultAspObjId(reqDto.getResultAspObjId());//SimpleFieldAssign//sourceId:335521_1_16625
                }


                /*D2-3新增应用实例配置关系(公共)[3102]   */
                Assert.isNull(addApplexConrelComReqDto.getSchOpenRecordId(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-方案开通记录ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getConfSchemeCode(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-配置方案标识不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexType(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-应用实例类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexId(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-应用实例ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getResultAspObjType(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-答案归属对象类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getResultAspObjId(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-答案归属对象ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getIsInitialScheme(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-是否初始方案答案不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getAscriptionSpaceId(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-归属空间ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getSubjectLifeCycle(), "D2-3新增模板方案配置关系-D2-3新增应用实例配置关系(公共)-主体生命周期不能为空", false);
                addApplexConrelComRespDto = addApplexConrelCom(addApplexConrelComReqDto);


            }
//processBranchName:正常结束 ,processBranchId:16626

        }
        AddTempSchemeConrelRespDto retData = new AddTempSchemeConrelRespDto();


        return retData;
    }

    /**
     * D2-3删除模板方案配置关系[4837]
     * gen by moon at 10/14/2022, 2:12:11 PM
     */
    @Trace(operationName = "D2-3删除模板方案配置关系")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public DeleteTempSchemeConrelRespDto deleteTempSchemeConrel(DeleteTempSchemeConrelReqDto reqDto) {


        //virtualUsage 2-3-04查询配置方案详情  19483
        OmsConfScheme omsConfScheme = null;
        QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
        if (reqDto != null) {
            queryConfSchemeDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:377549_1_19483
        }

        /*2-3-04查询配置方案详情[1923]   */
        Assert.isNull(queryConfSchemeDetailReq.getConfSchemeCode(), "D2-3删除模板方案配置关系-2-3-04查询配置方案详情-配置方案标识不能为空", false);
        omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq);


//virtualUsage 2-3-13查询应用实例配置关系详情  19484
        OmsConfApplexRel omsConfApplexRel = null;
        if (omsConfScheme != null) {
            QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
            queryApplexConrelDetailReq.setApplexType("EVA_TEMP");//sourceId:377455_1_19484
            queryApplexConrelDetailReq.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377457_1_19484
            if (omsConfScheme != null) {
                queryApplexConrelDetailReq.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:377573_1_19484
            }
            if (reqDto != null) {
                queryApplexConrelDetailReq.setApplexId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:377456_1_19484
            }

            /*2-3-13查询应用实例配置关系详情[2122]   */
            Assert.isNull(queryApplexConrelDetailReq.getConfSchemeId(), "D2-3删除模板方案配置关系-2-3-13查询应用实例配置关系详情-配置方案ID不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getApplexId(), "D2-3删除模板方案配置关系-2-3-13查询应用实例配置关系详情-应用实例ID不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getApplexType(), "D2-3删除模板方案配置关系-2-3-13查询应用实例配置关系详情-应用实例类型不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getAscriptionSpaceId(), "D2-3删除模板方案配置关系-2-3-13查询应用实例配置关系详情-归属空间ID不能为空", false);
            omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq);


        }
//virtualUsage 2-3-13删除应用实例配置关系  19485
        boolean bOOLEAN;
        if (omsConfApplexRel != null) {
            String string = new String();
            if (omsConfApplexRel != null) {
                string = omsConfApplexRel.getApplexRelId();
                ;//SimpleFieldAssign//sourceId:377468_1_19485
            }

            /*2-3-13删除应用实例配置关系[2373]   */
            Assert.isNull(string, "D2-3删除模板方案配置关系-2-3-13删除应用实例配置关系-应用实例配置关系ID不能为空", false);
            bOOLEAN = mOmsConfApplexRelService.deleteApplexConrel(string);


        }
//virtualUsage 2-3-07查询方案下选项配置结果列表  19478
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        if (omsConfScheme != null && omsConfApplexRel != null) {
            QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
            queryConfItemResultListReq.setResultAspObjType("EVA_TEMP");//sourceId:377534_1_19478
            if (omsConfScheme != null) {
                queryConfItemResultListReq.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:377572_1_19478
            }
            if (omsConfApplexRel != null) {
                queryConfItemResultListReq.setApplexRelId(omsConfApplexRel.getApplexRelId());//SimpleFieldAssign//sourceId:377574_1_19478
            }
            if (reqDto != null) {
                queryConfItemResultListReq.setResultAspObjId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:377533_1_19478
            }

            /*2-3-07查询方案下选项配置结果列表[1940]   */
            Assert.isNull(queryConfItemResultListReq.getConfSchemeId(), "D2-3删除模板方案配置关系-2-3-07查询方案下选项配置结果列表-配置方案ID 不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getApplexRelId(), "D2-3删除模板方案配置关系-2-3-07查询方案下选项配置结果列表-应用实例配置关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getResultAspObjId(), "D2-3删除模板方案配置关系-2-3-07查询方案下选项配置结果列表-答案归属对象ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getResultAspObjType(), "D2-3删除模板方案配置关系-2-3-07查询方案下选项配置结果列表-答案归属对象类型不能为空", false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq);


        }
//virtualUsage 2-03-07批量删除方案下选项配置结果  19479
        boolean bOOLEAN_1;
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
            List<String> listString = new ArrayList<>();
            listString = listOmsConfSchemeOptionResult.stream().map(item -> item.getOptionResultId())
                    .collect(Collectors.toList());/*list-to-strings*///sourceId:377511_1_19479

            /*2-03-07批量删除方案下选项配置结果[1988]   */

            bOOLEAN_1 = mOmsConfSchemeOptionResultService.batchDeleteConfItemResult(listString);


        }
//virtualUsage 2-3-13查询应用实例配置关系列表  19482
        List<OmsConfApplexRel> listOmsConfApplexRel = new ArrayList<>();
        if (omsConfScheme != null) {
            QueryApplexConrelListReq queryApplexConrelListReq = new QueryApplexConrelListReq();
            queryApplexConrelListReq.setApplexType("EVA_TEMP");//sourceId:377542_1_19482
            queryApplexConrelListReq.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377545_1_19482
            queryApplexConrelListReq.setIsArchive("FALSE");//sourceId:377546_1_19482
            if (omsConfScheme != null) {
                queryApplexConrelListReq.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:377576_1_19482
            }

            /*2-3-13查询应用实例配置关系列表[2124]   */
            Assert.isNull(queryApplexConrelListReq.getConfSchemeId(), "D2-3删除模板方案配置关系-2-3-13查询应用实例配置关系列表-配置方案ID不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getApplexType(), "D2-3删除模板方案配置关系-2-3-13查询应用实例配置关系列表-应用实例类型不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getAscriptionSpaceId(), "D2-3删除模板方案配置关系-2-3-13查询应用实例配置关系列表-归属空间ID不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getIsArchive(), "D2-3删除模板方案配置关系-2-3-13查询应用实例配置关系列表-是否存档不能为空", false);
            listOmsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelList(queryApplexConrelListReq);


        }
        if ((listOmsConfApplexRel != null && listOmsConfApplexRel != null && listOmsConfApplexRel.size() == 0)) {
            //if(2-3-13查询应用实例配置关系列表.应用实例配置关系列表数据集条数 等于 0)  19486

            OmsSchemeOpenRecord omsSchemeOpenRecord = null;
            if (omsConfScheme != null) {
                QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
                querySchemeOpenRecordDetailReq.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377474_1_19487
                if (omsConfScheme != null) {
                    querySchemeOpenRecordDetailReq.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:377577_1_19487
                }

                /*2-3-12查询方案开通记录详情[1954]   */
                Assert.isNull(querySchemeOpenRecordDetailReq.getConfSchemeId(), "D2-3删除模板方案配置关系-2-3-12查询方案开通记录详情-配置方案ID不能为空", false);
                Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2-3删除模板方案配置关系-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
                omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq);


            }
            boolean bOOLEAN_2;
            if (omsSchemeOpenRecord != null) {
                String string_1 = new String();
                if (omsSchemeOpenRecord != null) {
                    string_1 = omsSchemeOpenRecord.getSchOpenRecordId();
                    ;//SimpleFieldAssign//sourceId:377469_1_19488
                }

                /*2-3-12删除方案开通记录[1953]   */
                Assert.isNull(string_1, "D2-3删除模板方案配置关系-2-3-12删除方案开通记录-方案开通记录ID不能为空", false);
                bOOLEAN_2 = mOmsSchemeOpenRecordService.deleteSchemeOpenRecord(string_1);


            }
        } else {
            //else  19489

            RefreshSchemeOpenRecordAddComRespDto refreshSchemeOpenRecordAddComRespDto = null;
            RefreshSchemeOpenRecordAddComReqDto refreshSchemeOpenRecordAddComReqDto = new RefreshSchemeOpenRecordAddComReqDto();
            refreshSchemeOpenRecordAddComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377579_1_19490
            if (reqDto != null) {
                refreshSchemeOpenRecordAddComReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:377578_1_19490
            }

            /*D2-3更新方案开通记录回增(公共)[3165]   */
            Assert.isNull(refreshSchemeOpenRecordAddComReqDto.getConfSchemeCode(), "D2-3删除模板方案配置关系-D2-3更新方案开通记录回增(公共)-配置方案标识不能为空", false);
            Assert.isNull(refreshSchemeOpenRecordAddComReqDto.getTenantSpaceId(), "D2-3删除模板方案配置关系-D2-3更新方案开通记录回增(公共)-租户空间ID不能为空", false);
            refreshSchemeOpenRecordAddComRespDto = refreshSchemeOpenRecordAddCom(refreshSchemeOpenRecordAddComReqDto);


        }
//processBranchName:正常结束 ,processBranchId:19492

        DeleteTempSchemeConrelRespDto retData = new DeleteTempSchemeConrelRespDto();


        return retData;
    }

    /**
     * D2-3删除模板方案配置关系(公共)[4837]
     * gen by moon at 5/3/2023, 2:38:00 PM
     */
    @Trace(operationName = "D2-3删除模板方案配置关系(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public DeleteTempSchemeConrelComRespDto deleteTempSchemeConrelCom(DeleteTempSchemeConrelComReqDto reqDto) {


        //virtualUsage 2-3-04查询配置方案详情  19483
        OmsConfScheme omsConfScheme = null;
        QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
        if (reqDto != null) {
            queryConfSchemeDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:378803_1_19483
            queryConfSchemeDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:378808_1_19483
        }

        /*2-3-04查询配置方案详情[1923]   */

        omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//virtualUsage 2-3-13查询应用实例配置关系详情  19484
        OmsConfApplexRel omsConfApplexRel = null;
        if (omsConfScheme != null) {
            QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
            queryApplexConrelDetailReq.setApplexType("EVA_TEMP");//sourceId:377455_1_19484
            queryApplexConrelDetailReq.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377457_1_19484
            if (omsConfScheme != null) {
                queryApplexConrelDetailReq.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:377573_1_19484
            }
            if (reqDto != null) {
                queryApplexConrelDetailReq.setApplexId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:377456_1_19484
            }

            /*2-3-13查询应用实例配置关系详情[2122]   */
            Assert.isNull(queryApplexConrelDetailReq.getConfSchemeId(), "D2-3删除模板方案配置关系(公共)-2-3-13查询应用实例配置关系详情-配置方案ID不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getApplexId(), "D2-3删除模板方案配置关系(公共)-2-3-13查询应用实例配置关系详情-应用实例ID不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getApplexType(), "D2-3删除模板方案配置关系(公共)-2-3-13查询应用实例配置关系详情-应用实例类型不能为空", false);
            Assert.isNull(queryApplexConrelDetailReq.getAscriptionSpaceId(), "D2-3删除模板方案配置关系(公共)-2-3-13查询应用实例配置关系详情-归属空间ID不能为空", false);
            omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        }
//virtualUsage 2-3-13删除应用实例配置关系  19485
        boolean bOOLEAN;
        if (omsConfApplexRel != null) {
            String string = new String();
            if (omsConfApplexRel != null) {
                string = omsConfApplexRel.getApplexRelId();
                ;//SimpleFieldAssign//sourceId:377468_1_19485
            }

            /*2-3-13删除应用实例配置关系[2373]   */
            Assert.isNull(string, "D2-3删除模板方案配置关系(公共)-2-3-13删除应用实例配置关系-应用实例配置关系ID不能为空", false);
            bOOLEAN = mOmsConfApplexRelService.deleteApplexConrel(string)/*vcase invoke 本地 method 方法调用;*/;


        }
//virtualUsage 2-3-07查询方案下选项配置结果列表  19478
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        if (omsConfScheme != null && omsConfApplexRel != null) {
            QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
            queryConfItemResultListReq.setResultAspObjType("EVA_TEMP");//sourceId:377534_1_19478
            if (omsConfScheme != null) {
                queryConfItemResultListReq.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:377572_1_19478
            }
            if (omsConfApplexRel != null) {
                queryConfItemResultListReq.setApplexRelId(omsConfApplexRel.getApplexRelId());//SimpleFieldAssign//sourceId:377574_1_19478
            }
            if (reqDto != null) {
                queryConfItemResultListReq.setResultAspObjId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:377533_1_19478
            }

            /*2-3-07查询方案下选项配置结果列表[1940]   */
            Assert.isNull(queryConfItemResultListReq.getConfSchemeId(), "D2-3删除模板方案配置关系(公共)-2-3-07查询方案下选项配置结果列表-配置方案ID 不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getApplexRelId(), "D2-3删除模板方案配置关系(公共)-2-3-07查询方案下选项配置结果列表-应用实例配置关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getResultAspObjId(), "D2-3删除模板方案配置关系(公共)-2-3-07查询方案下选项配置结果列表-答案归属对象ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getResultAspObjType(), "D2-3删除模板方案配置关系(公共)-2-3-07查询方案下选项配置结果列表-答案归属对象类型不能为空", false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq)/*vcase invoke 本地 method 方法调用;*/;


        }
//virtualUsage 2-03-07批量删除方案下选项配置结果  19479
        boolean bOOLEAN_1;
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
            List<String> listString = new ArrayList<>();
            if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                listString = listOmsConfSchemeOptionResult.stream().map(item -> item.getOptionResultId())
                        .collect(Collectors.toList());/*list-to-strings*///sourceId:377511_1_19479
            }

            /*2-03-07批量删除方案下选项配置结果[1988]   */

            bOOLEAN_1 = mOmsConfSchemeOptionResultService.batchDeleteConfItemResult(listString)/*vcase invoke 本地 method 方法调用;*/;


        }
//virtualUsage 2-3-13查询应用实例配置关系列表  19482
        List<OmsConfApplexRel> listOmsConfApplexRel = new ArrayList<>();
        if (omsConfScheme != null) {
            QueryApplexConrelListReq queryApplexConrelListReq = new QueryApplexConrelListReq();
            queryApplexConrelListReq.setApplexType("EVA_TEMP");//sourceId:377542_1_19482
            queryApplexConrelListReq.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377545_1_19482
            queryApplexConrelListReq.setIsArchive("FALSE");//sourceId:377546_1_19482
            if (omsConfScheme != null) {
                queryApplexConrelListReq.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:377576_1_19482
            }

            /*2-3-13查询应用实例配置关系列表[2124]   */
            Assert.isNull(queryApplexConrelListReq.getConfSchemeId(), "D2-3删除模板方案配置关系(公共)-2-3-13查询应用实例配置关系列表-配置方案ID不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getApplexType(), "D2-3删除模板方案配置关系(公共)-2-3-13查询应用实例配置关系列表-应用实例类型不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getAscriptionSpaceId(), "D2-3删除模板方案配置关系(公共)-2-3-13查询应用实例配置关系列表-归属空间ID不能为空", false);
            Assert.isNull(queryApplexConrelListReq.getIsArchive(), "D2-3删除模板方案配置关系(公共)-2-3-13查询应用实例配置关系列表-是否存档不能为空", false);
            listOmsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelList(queryApplexConrelListReq)/*vcase invoke 本地 method 方法调用;*/;


        }
        if ((listOmsConfApplexRel != null && listOmsConfApplexRel != null && listOmsConfApplexRel.size() == 0)) {
            //if(2-3-13查询应用实例配置关系列表.应用实例配置关系列表数据集条数 等于 0)  19486

            OmsSchemeOpenRecord omsSchemeOpenRecord = null;
            if (omsConfScheme != null) {
                QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
                querySchemeOpenRecordDetailReq.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377474_1_19487
                if (omsConfScheme != null) {
                    querySchemeOpenRecordDetailReq.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:377577_1_19487
                }

                /*2-3-12查询方案开通记录详情[1954]   */
                Assert.isNull(querySchemeOpenRecordDetailReq.getConfSchemeId(), "D2-3删除模板方案配置关系(公共)-2-3-12查询方案开通记录详情-配置方案ID不能为空", false);
                Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2-3删除模板方案配置关系(公共)-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
                omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


            }
            boolean bOOLEAN_2;
            if (omsSchemeOpenRecord != null) {
                String string_1 = new String();
                if (omsSchemeOpenRecord != null) {
                    string_1 = omsSchemeOpenRecord.getSchOpenRecordId();
                    ;//SimpleFieldAssign//sourceId:377469_1_19488
                }

                /*2-3-12删除方案开通记录[1953]   */
                Assert.isNull(string_1, "D2-3删除模板方案配置关系(公共)-2-3-12删除方案开通记录-方案开通记录ID不能为空", false);
                bOOLEAN_2 = mOmsSchemeOpenRecordService.deleteSchemeOpenRecord(string_1)/*vcase invoke 本地 method 方法调用;*/;


            }
        } else {
            //else  19489

            RefreshSchemeOpenRecordAddComRespDto refreshSchemeOpenRecordAddComRespDto = null;
            if (omsConfScheme != null) {
                RefreshSchemeOpenRecordAddComReqDto refreshSchemeOpenRecordAddComReqDto = new RefreshSchemeOpenRecordAddComReqDto();
                refreshSchemeOpenRecordAddComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377579_1_19490
                if (omsConfScheme != null) {
                    refreshSchemeOpenRecordAddComReqDto.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//SimpleFieldAssign//sourceId:377578_1_19490
                }

                /*D2-3更新方案开通记录回增(公共)[3165]   */
                Assert.isNull(refreshSchemeOpenRecordAddComReqDto.getConfSchemeCode(), "D2-3删除模板方案配置关系(公共)-D2-3更新方案开通记录回增(公共)-配置方案标识不能为空", false);
                Assert.isNull(refreshSchemeOpenRecordAddComReqDto.getTenantSpaceId(), "D2-3删除模板方案配置关系(公共)-D2-3更新方案开通记录回增(公共)-租户空间ID不能为空", false);
                refreshSchemeOpenRecordAddComRespDto = refreshSchemeOpenRecordAddCom(refreshSchemeOpenRecordAddComReqDto)/*vcase invoke 同服务,同domain*/;


            }
        }
//processBranchName:正常结束 ,processBranchId:19492

        DeleteTempSchemeConrelComRespDto retData = new DeleteTempSchemeConrelComRespDto();


        return retData;
    }

    /**
     * D2-3新增模板方案配置关系(公共)[4619]
     * gen by moon at 12/6/2022, 7:31:37 PM
     */
    @Trace(operationName = "D2-3新增模板方案配置关系(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddTempSchemeConrelComRespDto addTempSchemeConrelCom(AddTempSchemeConrelComReqDto reqDto) {


        //virtualUsage D2-3查询方案开通记录详情(公共)  16620
        QuerySchemeOpenRecordDetailComRespDto querySchemeOpenRecordDetailComRespDto = null;
        QuerySchemeOpenRecordDetailComReqDto querySchemeOpenRecordDetailComReqDto = new QuerySchemeOpenRecordDetailComReqDto();
        querySchemeOpenRecordDetailComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:335588_1_16620
        querySchemeOpenRecordDetailComReqDto.setIsArchive("FALSE");//sourceId:335586_1_16620
        if (reqDto != null) {
            querySchemeOpenRecordDetailComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:379929_1_16620
            querySchemeOpenRecordDetailComReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:335590_1_16620
        }

        /*D2-3查询方案开通记录详情(公共)[2106]   */
        Assert.isNull(querySchemeOpenRecordDetailComReqDto.getTenantSpaceId(), "D2-3新增模板方案配置关系(公共)-D2-3查询方案开通记录详情(公共)-租户空间ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailComReqDto.getIsArchive(), "D2-3新增模板方案配置关系(公共)-D2-3查询方案开通记录详情(公共)-是否存档不能为空", false);
        querySchemeOpenRecordDetailComRespDto = querySchemeOpenRecordDetailCom(querySchemeOpenRecordDetailComReqDto);


        if ((querySchemeOpenRecordDetailComRespDto != null && querySchemeOpenRecordDetailComRespDto.getSchOpenRecordId() == null)) {
            //if(D2-3查询方案开通记录详情(公共).方案开通记录ID 值等于空 )  16621

            OmsConfScheme omsConfScheme = null;
            QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
            queryConfSchemeDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:335621_1_16628
            if (reqDto != null) {
                queryConfSchemeDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:379933_1_16628
                queryConfSchemeDetailReq.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:335603_1_16628
            }

            /*2-3-04查询配置方案详情[1923]   */
            Assert.isNull(queryConfSchemeDetailReq.getSubjectLifeCycle(), "D2-3新增模板方案配置关系(公共)-2-3-04查询配置方案详情-生命周期状态不能为空", false);
            omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq);
            Assert.isTrue(omsConfScheme == null || omsConfScheme.getConfSchemeId() == null, "找不到数据，系统异常", false);


            AddSchemeOpenRecordComRespDto addSchemeOpenRecordComRespDto = null;
            if (omsConfScheme != null) {
                AddSchemeOpenRecordComReqDto addSchemeOpenRecordComReqDto = new AddSchemeOpenRecordComReqDto();
                //addSchemeOpenRecordComReqDto.setApplexType("EVA_TEMP");//sourceId:335536_1_16627
//addSchemeOpenRecordComReqDto.setResultAspObjType("EVA_TEMP");//sourceId:335538_1_16627
                addSchemeOpenRecordComReqDto.setIsMainConfScheme("TRUE");//sourceId:335539_1_16627
                addSchemeOpenRecordComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:335540_1_16627
                addSchemeOpenRecordComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:335541_1_16627
//addSchemeOpenRecordComReqDto.setIsAllowOpt("TRUE");//sourceId:335542_1_16627
                if (omsConfScheme != null) {
                    addSchemeOpenRecordComReqDto.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:335531_1_16627
                    addSchemeOpenRecordComReqDto.setAuthorizationNum(omsConfScheme.getAuthorizationNum());//SimpleFieldAssign//sourceId:489938_1_16627
                }
                if (reqDto != null) {
                    // addSchemeOpenRecordComReqDto.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:335535_1_16627
//addSchemeOpenRecordComReqDto.setResultAspObjId(reqDto.getResultAspObjId());//SimpleFieldAssign//sourceId:335537_1_16627
                }

                /*D2-3新增方案开通记录(公共)[2116]   */
                Assert.isNull(addSchemeOpenRecordComReqDto.getConfSchemeId(), "D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-配置方案ID不能为空", false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getApplexId(),"D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-应用实例ID不能为空",false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getApplexType(),"D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-应用实例类型不能为空",false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getResultAspObjId(),"D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-答案归属对象ID不能为空",false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getResultAspObjType(),"D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-答案归属对象类型不能为空",false);
                Assert.isNull(addSchemeOpenRecordComReqDto.getIsMainConfScheme(), "D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-是否主配置方案不能为空", false);
                Assert.isNull(addSchemeOpenRecordComReqDto.getTenantSpaceId(), "D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-租户空间ID不能为空", false);
                Assert.isNull(addSchemeOpenRecordComReqDto.getSubjectLifeCycle(), "D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-主体生命周期不能为空", false);
//Assert.isNull(addSchemeOpenRecordComReqDto.getIsAllowOpt(),"D2-3新增模板方案配置关系(公共)-D2-3新增方案开通记录(公共)-是否允许操作不能为空",false);
                addSchemeOpenRecordComRespDto = addSchemeOpenRecordCom(addSchemeOpenRecordComReqDto);


            }
//processBranchName:正常结束 ,processBranchId:16623

        } else if ((querySchemeOpenRecordDetailComRespDto != null && querySchemeOpenRecordDetailComRespDto.getSchOpenRecordId() != null)) {
            //elseif(D2-3查询方案开通记录详情(公共).方案开通记录ID 值不等于空 )  16624

            AddApplexConrelComRespDto addApplexConrelComRespDto = null;
            if (querySchemeOpenRecordDetailComRespDto != null) {
                AddApplexConrelComReqDto addApplexConrelComReqDto = new AddApplexConrelComReqDto();
                addApplexConrelComReqDto.setApplexType("EVA_TEMP");//sourceId:335524_1_16625
                addApplexConrelComReqDto.setResultAspObjType("EVA_TEMP");//sourceId:335522_1_16625
                addApplexConrelComReqDto.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:335526_1_16625
                addApplexConrelComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:335528_1_16625
                if (querySchemeOpenRecordDetailComRespDto != null) {
                    addApplexConrelComReqDto.setSchOpenRecordId(querySchemeOpenRecordDetailComRespDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:335530_1_16625
                    addApplexConrelComReqDto.setConfSchemeId(querySchemeOpenRecordDetailComRespDto.getConfSchemeId());//SimpleFieldAssign//sourceId:379611_1_16625
                    addApplexConrelComReqDto.setConfSchemeCode(querySchemeOpenRecordDetailComRespDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:335523_1_16625
                    addApplexConrelComReqDto.setIsInitialScheme(querySchemeOpenRecordDetailComRespDto.getIsInitialScheme());//SimpleFieldAssign//sourceId:335529_1_16625
                }
                if (reqDto != null) {
                    addApplexConrelComReqDto.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:335525_1_16625
                    addApplexConrelComReqDto.setResultAspObjId(reqDto.getResultAspObjId());//SimpleFieldAssign//sourceId:335521_1_16625
                }

                /*D2-3新增应用实例配置关系(公共)[3102]   */
                Assert.isNull(addApplexConrelComReqDto.getSchOpenRecordId(), "D2-3新增模板方案配置关系(公共)-D2-3新增应用实例配置关系(公共)-方案开通记录ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getConfSchemeCode(), "D2-3新增模板方案配置关系(公共)-D2-3新增应用实例配置关系(公共)-配置方案标识不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexType(), "D2-3新增模板方案配置关系(公共)-D2-3新增应用实例配置关系(公共)-应用实例类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexId(), "D2-3新增模板方案配置关系(公共)-D2-3新增应用实例配置关系(公共)-应用实例ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getResultAspObjType(), "D2-3新增模板方案配置关系(公共)-D2-3新增应用实例配置关系(公共)-答案归属对象类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getResultAspObjId(), "D2-3新增模板方案配置关系(公共)-D2-3新增应用实例配置关系(公共)-答案归属对象ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getAscriptionSpaceId(), "D2-3新增模板方案配置关系(公共)-D2-3新增应用实例配置关系(公共)-归属空间ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getSubjectLifeCycle(), "D2-3新增模板方案配置关系(公共)-D2-3新增应用实例配置关系(公共)-主体生命周期不能为空", false);
                addApplexConrelComRespDto = addApplexConrelCom(addApplexConrelComReqDto);


            }
//processBranchName:正常结束 ,processBranchId:16626

        }
        AddTempSchemeConrelComRespDto retData = new AddTempSchemeConrelComRespDto();


        return retData;
    }

    /**
     * D2-3新增空间方案开通记录(公共)[3080]
     * gen by moon at 4/23/2023, 11:14:42 AM
     */
    @Trace(operationName = "D2-3新增空间方案开通记录(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddSpaceSchemeOpenRecordComRespDto addSpaceSchemeOpenRecordCom(AddSpaceSchemeOpenRecordComReqDto reqDto) {


        String string_1 = null;
//virtualUsage 2-3-04查询配置方案详情  23865
        OmsConfScheme omsConfScheme = null;
        QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
        queryConfSchemeDetailReq.setApplObjType("TENANT_SPACE");//sourceId:489568_1_23865
        queryConfSchemeDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:489555_1_23865
        if (reqDto != null) {
            queryConfSchemeDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:489536_1_23865
        }

        /*2-3-04查询配置方案详情[1923]   */
        Assert.isNull(queryConfSchemeDetailReq.getConfSchemeId(), "D2-3新增空间方案开通记录(公共)-2-3-04查询配置方案详情-配置方案ID 不能为空", false);
        Assert.isNull(queryConfSchemeDetailReq.getApplObjType(), "D2-3新增空间方案开通记录(公共)-2-3-04查询配置方案详情-应用对象类型不能为空", false);
        Assert.isNull(queryConfSchemeDetailReq.getSubjectLifeCycle(), "D2-3新增空间方案开通记录(公共)-2-3-04查询配置方案详情-生命周期状态不能为空", false);
        omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((omsConfScheme != null && omsConfScheme != null && omsConfScheme.getAuthType() != null && omsConfScheme.getAuthType().equals("QUANTITY"))) {
            //if((2-3-04查询配置方案（授权类型、授权单位等）.出参 值不等于空  and 2-3-04查询配置方案（授权类型、授权单位等）.授权类型 等于 数量型))  23866

            String string = null;
            if (omsConfScheme != null) {
                OmsSchemeOpenRecord omsSchemeOpenRecord = new OmsSchemeOpenRecord();
                omsSchemeOpenRecord.setAuthUseType("USABLE");//sourceId:489514_1_23867
                if (omsConfScheme != null) {
                    omsSchemeOpenRecord.setConfSchemeId(omsConfScheme.getConfSchemeId());//SimpleFieldAssign//sourceId:489504_1_23867
                    omsSchemeOpenRecord.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//SimpleFieldAssign//sourceId:489505_1_23867
                    omsSchemeOpenRecord.setAuthType(omsConfScheme.getAuthType());//SimpleFieldAssign//sourceId:489513_1_23867
                    omsSchemeOpenRecord.setAuthUnit(omsConfScheme.getAuthUnit());//SimpleFieldAssign//sourceId:489512_1_23867
                }
                if (reqDto != null) {
                    omsSchemeOpenRecord.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489506_1_23867
                    omsSchemeOpenRecord.setRemainingQty(reqDto.getAuthorizationNum());//SimpleFieldAssign//sourceId:489507_1_23867
                    omsSchemeOpenRecord.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:489515_1_23867
                    omsSchemeOpenRecord.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:489510_1_23867
                }

                /*2-3-12新增方案开通记录[1951]   */
                Assert.isNull(omsSchemeOpenRecord.getConfSchemeId(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-配置方案ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getConfSchemeCode(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-配置方案标识不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getTenantSpaceId(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-租户空间ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getAuthType(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-授权类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getIsMainConfScheme(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-是否主配置方案不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getAuthUseType(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-授权使用类型不能为空", false);
                Assert.isNull(omsSchemeOpenRecord.getSubjectLifeCycle(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-主体生命周期不能为空", false);
                string = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord)/*vcase invoke 本地 method 方法调用;*/;


                string_1 = string;
            }
            AddApplexConrelComRespDto addApplexConrelComRespDto = null;
            if (string != null && omsConfScheme != null) {
                AddApplexConrelComReqDto addApplexConrelComReqDto = new AddApplexConrelComReqDto();
                addApplexConrelComReqDto.setApplexType("TENANT_SPACE");//sourceId:489527_1_23868
                addApplexConrelComReqDto.setResultAspObjType("TENANT_SPACE");//sourceId:489525_1_23868
                if (string != null) {
                    addApplexConrelComReqDto.setSchOpenRecordId(string);//SimpleFieldAssign//sourceId:489533_1_23868
                }
                if (reqDto != null) {
                    addApplexConrelComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:489534_1_23868
                    addApplexConrelComReqDto.setApplexId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489528_1_23868
                    addApplexConrelComReqDto.setResultAspObjId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489524_1_23868
                    addApplexConrelComReqDto.setAscriptionSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489529_1_23868
                    addApplexConrelComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:489531_1_23868
                }
                if (omsConfScheme != null) {
                    addApplexConrelComReqDto.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//SimpleFieldAssign//sourceId:489526_1_23868
                    addApplexConrelComReqDto.setIsInitialScheme(omsConfScheme.getIsInitialScheme());//SimpleFieldAssign//sourceId:489532_1_23868
                }

                /*D2-3新增应用实例配置关系(公共)[3102]   */
                Assert.isNull(addApplexConrelComReqDto.getSchOpenRecordId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-方案开通记录ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getConfSchemeId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-配置方案ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getConfSchemeCode(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-配置方案标识不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-应用实例ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getApplexType(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-应用实例类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getIsInitialScheme(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-是否初始方案答案不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getResultAspObjType(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-答案归属对象类型不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getResultAspObjId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-答案归属对象ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getAscriptionSpaceId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-归属空间ID不能为空", false);
                Assert.isNull(addApplexConrelComReqDto.getSubjectLifeCycle(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-主体生命周期不能为空", false);
                addApplexConrelComRespDto = addApplexConrelCom(addApplexConrelComReqDto)/*vcase invoke 同服务,同domain*/;


            }
        } else if ((omsConfScheme != null && omsConfScheme != null && omsConfScheme.getAuthType() != null && omsConfScheme.getAuthType().equals("CYCLE_TIME"))) {
            //elseif((2-3-04查询配置方案（授权类型、授权单位等）.出参 值不等于空  and 2-3-04查询配置方案（授权类型、授权单位等）.授权类型 等于 周期时间型))  23869

            ImplementCountTimeScopeServiceComRespDto implementCountTimeScopeServiceComRespDto = null;
            if (omsConfScheme != null) {
                ImplementCountTimeScopeServiceComReqDto implementCountTimeScopeServiceComReqDto = new ImplementCountTimeScopeServiceComReqDto();
                if (reqDto != null) {
                    implementCountTimeScopeServiceComReqDto.setComNumField(reqDto.getAuthorizationNum());//SimpleFieldAssign//sourceId:489942_1_23911
                }
                if (omsConfScheme != null) {
                    implementCountTimeScopeServiceComReqDto.setCycleTypeCode(omsConfScheme.getAuthUnit());//SimpleFieldAssign//sourceId:489943_1_23911
                }

                /*D2-执行计算时间范围服务(公共)[5409]   */
                Assert.isNull(implementCountTimeScopeServiceComReqDto.getComNumField(), "D2-3新增空间方案开通记录(公共)-D2-执行计算时间范围服务(公共)-通用数值字段（整数型）不能为空", false);
                Assert.isNull(implementCountTimeScopeServiceComReqDto.getCycleTypeCode(), "D2-3新增空间方案开通记录(公共)-D2-执行计算时间范围服务(公共)-周期类型标识不能为空", false);
                implementCountTimeScopeServiceComRespDto = interfaceModeService.implementCountTimeScopeServiceCom(implementCountTimeScopeServiceComReqDto)/*vcase invoke isSameApp*/;


            }
            CheckTimeScopeSearchComRespDto checkTimeScopeSearchComRespDto = null;
            if (implementCountTimeScopeServiceComRespDto != null) {
                CheckTimeScopeSearchComReqDto checkTimeScopeSearchComReqDto = new CheckTimeScopeSearchComReqDto();
                if (implementCountTimeScopeServiceComRespDto != null) {
                    checkTimeScopeSearchComReqDto.setCurrentTime(implementCountTimeScopeServiceComRespDto.getEndTime());//SimpleFieldAssign//sourceId:857026_1_37843
                    checkTimeScopeSearchComReqDto.setCompareTime(implementCountTimeScopeServiceComRespDto.getStartTime());//SimpleFieldAssign//sourceId:857028_1_37843
                }

                /*D2检查时间范围查询(周期时间型）[3297]   */
                Assert.isNull(checkTimeScopeSearchComReqDto.getCurrentTime(), "D2-3新增空间方案开通记录(公共)-D2检查时间范围查询(周期时间型）-当前时间不能为空", false);
                Assert.isNull(checkTimeScopeSearchComReqDto.getCompareTime(), "D2-3新增空间方案开通记录(公共)-D2检查时间范围查询(周期时间型）-比较时间不能为空", false);
                checkTimeScopeSearchComRespDto = divineDataService.checkTimeScopeSearchCom(checkTimeScopeSearchComReqDto)/*vcase invoke isSameApp*/;


            }
            if ((checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("LATER"))) {
                //if(D2检查时间范围查询(周期时间型）.时间比较结果 等于 之后（大于）)  23887

                String string_2 = null;
                if (omsConfScheme != null && implementCountTimeScopeServiceComRespDto != null) {
                    OmsSchemeOpenRecord omsSchemeOpenRecord_1 = new OmsSchemeOpenRecord();
                    omsSchemeOpenRecord_1.setAuthUseType("USABLE");//sourceId:489514_1_23888
                    if (reqDto != null) {
                        omsSchemeOpenRecord_1.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:489504_1_23888
                        omsSchemeOpenRecord_1.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489506_1_23888
                        omsSchemeOpenRecord_1.setRemainingQty(reqDto.getAuthorizationNum());//SimpleFieldAssign//sourceId:489507_1_23888
                        omsSchemeOpenRecord_1.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:489515_1_23888
                        omsSchemeOpenRecord_1.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:489510_1_23888
                    }
                    if (omsConfScheme != null) {
                        omsSchemeOpenRecord_1.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//SimpleFieldAssign//sourceId:489505_1_23888
                        omsSchemeOpenRecord_1.setAuthType(omsConfScheme.getAuthType());//SimpleFieldAssign//sourceId:489513_1_23888
                        omsSchemeOpenRecord_1.setAuthUnit(omsConfScheme.getAuthUnit());//SimpleFieldAssign//sourceId:489512_1_23888
                    }
                    if (implementCountTimeScopeServiceComRespDto != null) {
                        omsSchemeOpenRecord_1.setStartTime(implementCountTimeScopeServiceComRespDto.getStartTime());//SimpleFieldAssign//sourceId:489508_1_23888
                        omsSchemeOpenRecord_1.setEndTime(implementCountTimeScopeServiceComRespDto.getEndTime());//SimpleFieldAssign//sourceId:489509_1_23888
                    }

                    /*2-3-12新增方案开通记录[1951]   */
                    Assert.isNull(omsSchemeOpenRecord_1.getConfSchemeId(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-配置方案ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_1.getConfSchemeCode(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-配置方案标识不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_1.getTenantSpaceId(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-租户空间ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_1.getAuthType(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-授权类型不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_1.getIsMainConfScheme(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-是否主配置方案不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_1.getAuthUseType(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-授权使用类型不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_1.getSubjectLifeCycle(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-主体生命周期不能为空", false);
                    string_2 = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord_1)/*vcase invoke 本地 method 方法调用;*/;


                    string_1 = string_2;
                }
                AddApplexConrelComRespDto addApplexConrelComRespDto_2 = null;
                if (string_2 != null && omsConfScheme != null) {
                    AddApplexConrelComReqDto addApplexConrelComReqDto_1 = new AddApplexConrelComReqDto();
                    addApplexConrelComReqDto_1.setApplexType("TENANT_SPACE");//sourceId:489527_1_23889
                    addApplexConrelComReqDto_1.setResultAspObjType("TENANT_SPACE");//sourceId:489525_1_23889
                    if (string_2 != null) {
                        addApplexConrelComReqDto_1.setSchOpenRecordId(string_2);//SimpleFieldAssign//sourceId:489533_1_23889
                    }
                    if (reqDto != null) {
                        addApplexConrelComReqDto_1.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:489534_1_23889
                        addApplexConrelComReqDto_1.setApplexId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489528_1_23889
                        addApplexConrelComReqDto_1.setResultAspObjId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489524_1_23889
                        addApplexConrelComReqDto_1.setAscriptionSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489529_1_23889
                        addApplexConrelComReqDto_1.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:489531_1_23889
                    }
                    if (omsConfScheme != null) {
                        addApplexConrelComReqDto_1.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//SimpleFieldAssign//sourceId:489526_1_23889
                        addApplexConrelComReqDto_1.setIsInitialScheme(omsConfScheme.getIsInitialScheme());//SimpleFieldAssign//sourceId:489532_1_23889
                    }

                    /*D2-3新增应用实例配置关系(公共)[3102]   */
                    Assert.isNull(addApplexConrelComReqDto_1.getSchOpenRecordId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-方案开通记录ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getConfSchemeId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-配置方案ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getConfSchemeCode(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-配置方案标识不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getApplexId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-应用实例ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getApplexType(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-应用实例类型不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getIsInitialScheme(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-是否初始方案答案不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getResultAspObjType(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-答案归属对象类型不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getResultAspObjId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-答案归属对象ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getAscriptionSpaceId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-归属空间ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_1.getSubjectLifeCycle(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-主体生命周期不能为空", false);
                    addApplexConrelComRespDto_2 = addApplexConrelCom(addApplexConrelComReqDto_1)/*vcase invoke 同服务,同domain*/;


                }
            } else {
                //else  23890

//异常结束 23891
                throw new BizException("220200159", "对不起！授权时间不满足，请确认后重试~", false);
            }
        } else if ((omsConfScheme != null && omsConfScheme != null && omsConfScheme.getAuthType() != null && omsConfScheme.getAuthType().equals("FIXED_TIME"))) {
            //elseif((2-3-04查询配置方案（授权类型、授权单位等）.出参 值不等于空  and 2-3-04查询配置方案（授权类型、授权单位等）.授权类型 等于 固定时间型))  23872

            CheckTimeScopeSearchComRespDto checkTimeScopeSearchComRespDto_2 = null;
            CheckTimeScopeSearchComReqDto checkTimeScopeSearchComReqDto_1 = new CheckTimeScopeSearchComReqDto();
            checkTimeScopeSearchComReqDto_1.setCurrentTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:489521_1_23874
            if (reqDto != null) {
                checkTimeScopeSearchComReqDto_1.setCompareTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:489523_1_23874
            }

            /*D2检查时间范围查询(固定时间型）[3297]   */
            Assert.isNull(checkTimeScopeSearchComReqDto_1.getCurrentTime(), "D2-3新增空间方案开通记录(公共)-D2检查时间范围查询(固定时间型）-当前时间不能为空", false);
            Assert.isNull(checkTimeScopeSearchComReqDto_1.getCompareTime(), "D2-3新增空间方案开通记录(公共)-D2检查时间范围查询(固定时间型）-比较时间不能为空", false);
            checkTimeScopeSearchComRespDto_2 = divineDataService.checkTimeScopeSearchCom(checkTimeScopeSearchComReqDto_1)/*vcase invoke isSameApp*/;


            if ((checkTimeScopeSearchComRespDto_2 != null && checkTimeScopeSearchComRespDto_2.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto_2.getTimeCompareResult().equals("BEFORE"))) {
                //if(D2检查时间范围查询(固定时间型）.时间比较结果 等于 之前（小于）)  23875

//ModelCode: receptionService
                ObtainReceiveFieldsRespDto receptionServiceRes = null;
                ObtainReceiveFieldsReqDto receptionServiceReq = new ObtainReceiveFieldsReqDto();
                receptionServiceReq.setSystemDateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:857141_1_37844

                /*M2-获取当前时间[4007]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq.getSystemDateTime(), "D2-3新增空间方案开通记录(公共)-M2-获取当前时间-系统当前时间不能为空", false);
                receptionServiceRes = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq);


                String string_3 = null;
                if (omsConfScheme != null) {
                    OmsSchemeOpenRecord omsSchemeOpenRecord_2 = new OmsSchemeOpenRecord();
                    omsSchemeOpenRecord_2.setAuthUseType("USABLE");//sourceId:489514_1_23876
                    if (reqDto != null) {
                        omsSchemeOpenRecord_2.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:489504_1_23876
                        omsSchemeOpenRecord_2.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489506_1_23876
                        omsSchemeOpenRecord_2.setStartTime(reqDto.getStartTime());//SimpleFieldAssign//sourceId:489508_1_23876
                        omsSchemeOpenRecord_2.setEndTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:489509_1_23876
                        omsSchemeOpenRecord_2.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:489515_1_23876
                        omsSchemeOpenRecord_2.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:489510_1_23876
                    }
                    if (omsConfScheme != null) {
                        omsSchemeOpenRecord_2.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//SimpleFieldAssign//sourceId:489505_1_23876
                        omsSchemeOpenRecord_2.setAuthType(omsConfScheme.getAuthType());//SimpleFieldAssign//sourceId:489513_1_23876
                    }

                    /*2-3-12新增方案开通记录[1951]   */
                    Assert.isNull(omsSchemeOpenRecord_2.getConfSchemeId(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-配置方案ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_2.getConfSchemeCode(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-配置方案标识不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_2.getTenantSpaceId(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-租户空间ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_2.getAuthType(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-授权类型不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_2.getIsMainConfScheme(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-是否主配置方案不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_2.getAuthUseType(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-授权使用类型不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_2.getSubjectLifeCycle(), "D2-3新增空间方案开通记录(公共)-2-3-12新增方案开通记录-主体生命周期不能为空", false);
                    string_3 = mOmsSchemeOpenRecordService.addSchemeOpenRecord(omsSchemeOpenRecord_2)/*vcase invoke 本地 method 方法调用;*/;


                    string_1 = string_3;
                }
                AddApplexConrelComRespDto addApplexConrelComRespDto_3 = null;
                if (string_3 != null && omsConfScheme != null) {
                    AddApplexConrelComReqDto addApplexConrelComReqDto_2 = new AddApplexConrelComReqDto();
                    addApplexConrelComReqDto_2.setApplexType("TENANT_SPACE");//sourceId:489527_1_23877
                    addApplexConrelComReqDto_2.setResultAspObjType("TENANT_SPACE");//sourceId:489525_1_23877
                    if (string_3 != null) {
                        addApplexConrelComReqDto_2.setSchOpenRecordId(string_3);//SimpleFieldAssign//sourceId:489533_1_23877
                    }
                    if (reqDto != null) {
                        addApplexConrelComReqDto_2.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:489534_1_23877
                        addApplexConrelComReqDto_2.setApplexId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489528_1_23877
                        addApplexConrelComReqDto_2.setResultAspObjId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489524_1_23877
                        addApplexConrelComReqDto_2.setAscriptionSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:489529_1_23877
                        addApplexConrelComReqDto_2.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:489531_1_23877
                    }
                    if (omsConfScheme != null) {
                        addApplexConrelComReqDto_2.setConfSchemeCode(omsConfScheme.getConfSchemeCode());//SimpleFieldAssign//sourceId:489526_1_23877
                        addApplexConrelComReqDto_2.setIsInitialScheme(omsConfScheme.getIsInitialScheme());//SimpleFieldAssign//sourceId:489532_1_23877
                    }

                    /*D2-3新增应用实例配置关系(公共)[3102]   */
                    Assert.isNull(addApplexConrelComReqDto_2.getSchOpenRecordId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-方案开通记录ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getConfSchemeId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-配置方案ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getConfSchemeCode(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-配置方案标识不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getApplexId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-应用实例ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getApplexType(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-应用实例类型不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getIsInitialScheme(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-是否初始方案答案不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getResultAspObjType(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-答案归属对象类型不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getResultAspObjId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-答案归属对象ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getAscriptionSpaceId(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-归属空间ID不能为空", false);
                    Assert.isNull(addApplexConrelComReqDto_2.getSubjectLifeCycle(), "D2-3新增空间方案开通记录(公共)-D2-3新增应用实例配置关系(公共)-主体生命周期不能为空", false);
                    addApplexConrelComRespDto_3 = addApplexConrelCom(addApplexConrelComReqDto_2)/*vcase invoke 同服务,同domain*/;


                }
            } else {
                //else  23892

//异常结束 23893
                throw new BizException("220200159", "对不起！授权时间不满足，请确认后重试~", false);
            }
        } else {
            //else  23883

//异常结束 23884
            throw new BizException("220200160", "对不起！异常错误，请联系管理员~", false);
        }
//processBranchName:正常结束 ,processBranchId:23881

        AddSpaceSchemeOpenRecordComRespDto retData = new AddSpaceSchemeOpenRecordComRespDto();
        if (string_1 != null) {
            retData.setSchOpenRecordId(string_1);//SimpleFieldAssign//sourceId:489595_1
        }


        return retData;
    }

    /**
     * D2更新方案开通记录授权使用类型状态(公共)[5715]
     * gen by moon at 1/21/2023, 11:27:40 AM
     */
    @Trace(operationName = "D2更新方案开通记录授权使用类型状态(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public RefreshSchemeOpenRecordAuthUseTypeComRespDto refreshSchemeOpenRecordAuthUseTypeCom(RefreshSchemeOpenRecordAuthUseTypeComReqDto reqDto) {


        //virtualUsage 2-3-12查询方案开通记录详情  27376
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        querySchemeOpenRecordDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:612976_1_27376
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:612973_1_27376
            querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:612975_1_27376
        }

        /*2-3-12查询方案开通记录详情[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getConfSchemeId(), "D2更新方案开通记录授权使用类型状态(公共)-2-3-12查询方案开通记录详情-配置方案ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2更新方案开通记录授权使用类型状态(公共)-2-3-12查询方案开通记录详情-租户空间ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getSubjectLifeCycle(), "D2更新方案开通记录授权使用类型状态(公共)-2-3-12查询方案开通记录详情-主体生命周期不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq);


        if ((omsSchemeOpenRecord != null) && (omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("CYCLE_TIME") || omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("FIXED_TIME"))) {
            //if(2-3-12查询方案开通记录详情.出参 值不等于空  and (2-3-12查询方案开通记录详情.授权类型 等于 周期时间型 or 2-3-12查询方案开通记录详情.授权类型 等于 固定时间型))  27377

            boolean bOOLEAN;
            if (omsSchemeOpenRecord != null) {
                OmsSchemeOpenRecord omsSchemeOpenRecord_2 = new OmsSchemeOpenRecord();
                omsSchemeOpenRecord_2.setAuthUseType("EXPIRE__DISABLED");//sourceId:612997_1_27378
                if (omsSchemeOpenRecord != null) {
                    omsSchemeOpenRecord_2.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:612852_1_27378
                }

                /*2-3-12修改方案开通记录（到期不可用）[1952]   */
                Assert.isNull(omsSchemeOpenRecord_2.getSchOpenRecordId(), "D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（到期不可用）-方案开通记录ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_2.getAuthUseType(), "D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（到期不可用）-授权使用类型不能为空", false);
                bOOLEAN = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_2);


            }
        } else if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("QUANTITY"))) {
            //elseif((2-3-12查询方案开通记录详情.出参 值不等于空  and 2-3-12查询方案开通记录详情.授权类型 等于 数量型))  27379

            boolean bOOLEAN_1;
            if (omsSchemeOpenRecord != null) {
                OmsSchemeOpenRecord omsSchemeOpenRecord_3 = new OmsSchemeOpenRecord();
                omsSchemeOpenRecord_3.setRemainingQty(Long.valueOf(0));//CUSTOM_CONVENTION//sourceId:612999_1_27380
                omsSchemeOpenRecord_3.setAuthUseType("QUANTITY_INS_DISABLED");//sourceId:613005_1_27380
                if (omsSchemeOpenRecord != null) {
                    omsSchemeOpenRecord_3.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:612998_1_27380
                }

                /*2-3-12修改方案开通记录（数量不足不可用）[1952]   */
                Assert.isNull(omsSchemeOpenRecord_3.getSchOpenRecordId(), "D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（数量不足不可用）-方案开通记录ID不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_3.getRemainingQty(), "D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（数量不足不可用）-剩余授权数不能为空", false);
                Assert.isNull(omsSchemeOpenRecord_3.getAuthUseType(), "D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（数量不足不可用）-授权使用类型不能为空", false);
                bOOLEAN_1 = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_3);


            }
        }
        RefreshSchemeOpenRecordAuthUseTypeComRespDto retData = new RefreshSchemeOpenRecordAuthUseTypeComRespDto();


        return retData;
    }

    /**
     * D2-3更新删除涉及授权方案信息(公共)[4837]
     * gen by moon at 6/1/2023, 11:46:55 PM
     */
    @Trace(operationName = "D2-3更新删除涉及授权方案信息(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public RefreshDelInvolveAuthorizationSchInfoComRespDto refreshDelInvolveAuthorizationSchInfoCom(RefreshDelInvolveAuthorizationSchInfoComReqDto reqDto) {


        //virtualUsage 2-3-13查询应用实例配置关系详情  19484
        OmsConfApplexRel omsConfApplexRel = null;
        QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
        queryApplexConrelDetailReq.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377457_1_19484
        if (reqDto != null) {
            queryApplexConrelDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:377573_1_19484
            queryApplexConrelDetailReq.setApplexId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:377456_1_19484
        }

        /*2-3-13查询应用实例配置关系详情[2122]   */
        Assert.isNull(queryApplexConrelDetailReq.getConfSchemeId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-13查询应用实例配置关系详情-配置方案ID不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getApplexId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-13查询应用实例配置关系详情-开通对象ID不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getAscriptionSpaceId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-13查询应用实例配置关系详情-归属空间ID不能为空", false);
        omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//virtualUsage 2-3-13删除应用实例配置关系  19485
        boolean bOOLEAN;
        if (omsConfApplexRel != null) {
            String string = new String();
            if (omsConfApplexRel != null) {
                string = omsConfApplexRel.getApplexRelId();
                ;//SimpleFieldAssign//sourceId:377468_1_19485
            }

            /*2-3-13删除应用实例配置关系[2373]   */
            Assert.isNull(string, "D2-3更新删除涉及授权方案信息(公共)-2-3-13删除应用实例配置关系-开通对象使用关系ID不能为空", false);
            bOOLEAN = mOmsConfApplexRelService.deleteApplexConrel(string)/*vcase invoke 本地 method 方法调用;*/;


        }
//virtualUsage 2-3-07查询方案下选项配置结果列表  19478
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        if (omsConfApplexRel != null) {
            QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
            if (reqDto != null) {
                queryConfItemResultListReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:377572_1_19478
                queryConfItemResultListReq.setResultAspObjId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:377533_1_19478
            }
            if (omsConfApplexRel != null) {
                queryConfItemResultListReq.setApplexRelId(omsConfApplexRel.getApplexRelId());//SimpleFieldAssign//sourceId:377574_1_19478
            }

            /*2-3-07查询方案下选项配置结果列表[1940]   */
            Assert.isNull(queryConfItemResultListReq.getConfSchemeId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-07查询方案下选项配置结果列表-配置方案ID 不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getApplexRelId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-07查询方案下选项配置结果列表-使用关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getResultAspObjId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-07查询方案下选项配置结果列表-开通对象ID不能为空", false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq)/*vcase invoke 本地 method 方法调用;*/;


        }
//virtualUsage 2-03-07批量删除方案下选项配置结果  19479
        boolean bOOLEAN_1;
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
            List<String> listString = new ArrayList<>();
            if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                listString = listOmsConfSchemeOptionResult.stream().map(item -> item.getOptionResultId())
                        .collect(Collectors.toList());/*list-to-strings*///sourceId:377511_1_19479
            }

            /*2-03-07批量删除方案下选项配置结果[1988]   */

            bOOLEAN_1 = mOmsConfSchemeOptionResultService.batchDeleteConfItemResult(listString)/*vcase invoke 本地 method 方法调用;*/;


        }
//virtualUsage 2-3-13查询应用实例配置关系列表  19482
        List<OmsConfApplexRel> listOmsConfApplexRel = new ArrayList<>();
        QueryApplexConrelListReq queryApplexConrelListReq = new QueryApplexConrelListReq();
        queryApplexConrelListReq.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:377545_1_19482
        queryApplexConrelListReq.setIsArchive("FALSE");//sourceId:377546_1_19482
        if (reqDto != null) {
            queryApplexConrelListReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:377576_1_19482
        }

        /*2-3-13查询应用实例配置关系列表[2124]   */
        Assert.isNull(queryApplexConrelListReq.getConfSchemeId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-13查询应用实例配置关系列表-配置方案ID不能为空", false);
        Assert.isNull(queryApplexConrelListReq.getAscriptionSpaceId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-13查询应用实例配置关系列表-归属空间ID不能为空", false);
        Assert.isNull(queryApplexConrelListReq.getIsArchive(), "D2-3更新删除涉及授权方案信息(公共)-2-3-13查询应用实例配置关系列表-是否存档不能为空", false);
        listOmsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelList(queryApplexConrelListReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((listOmsConfApplexRel != null && listOmsConfApplexRel != null && listOmsConfApplexRel.size() == 0)) {
            //if(2-3-13查剩余其他使用关系【用于判断是否删除开通记录】.应用实例配置关系列表数据集条数 等于 0)  19486

            List<OmsSchemeOpenRecord> listOmsSchemeOpenRecord = new ArrayList<>();
            QuerySchemeOpenRecordListReq querySchemeOpenRecordListReq = new QuerySchemeOpenRecordListReq();
            querySchemeOpenRecordListReq.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:889921_1_39661
            querySchemeOpenRecordListReq.setIsArchive("FALSE");//sourceId:889923_1_39661
            if (reqDto != null) {
                querySchemeOpenRecordListReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:889919_1_39661
            }

            /*2-3-12查开通记录[1955]   */
            Assert.isNull(querySchemeOpenRecordListReq.getConfSchemeId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-12查开通记录-配置方案ID不能为空", false);
            Assert.isNull(querySchemeOpenRecordListReq.getTenantSpaceId(), "D2-3更新删除涉及授权方案信息(公共)-2-3-12查开通记录-租户空间ID不能为空", false);
            Assert.isNull(querySchemeOpenRecordListReq.getIsArchive(), "D2-3更新删除涉及授权方案信息(公共)-2-3-12查开通记录-是否存档不能为空", false);
            listOmsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordList(querySchemeOpenRecordListReq)/*vcase invoke 本地 method 方法调用;*/;


            boolean bOOLEAN_2;
            if (listOmsSchemeOpenRecord != null && !CollectionUtil.isEmpty(listOmsSchemeOpenRecord) && listOmsSchemeOpenRecord.size() > 0) {
                List<String> listString_1 = new ArrayList<>();
                if (listOmsSchemeOpenRecord != null && !CollectionUtil.isEmpty(listOmsSchemeOpenRecord) && listOmsSchemeOpenRecord != null && !CollectionUtil.isEmpty(listOmsSchemeOpenRecord)) {
                    listString_1 = listOmsSchemeOpenRecord.stream().map(item -> item.getSchOpenRecordId())
                            .collect(Collectors.toList());/*list-to-strings*///sourceId:889954_1_39662
                }

                /*2-3-12批量删开通记录[6464]   */

                bOOLEAN_2 = mOmsSchemeOpenRecordService.batchDeleteSchemeOpenRecord(listString_1)/*vcase invoke 本地 method 方法调用;*/;


            }
        }
        RefreshDelInvolveAuthorizationSchInfoComRespDto retData = new RefreshDelInvolveAuthorizationSchInfoComRespDto();


        return retData;
    }

    /**
     * D2执行更新开通记录(公共)[6468]
     * gen by moon at 5/9/2023, 7:40:06 PM
     */
    @Trace(operationName = "D2执行更新开通记录(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementUpdateSchOpenRecordComRespDto implementUpdateSchOpenRecordCom(ImplementUpdateSchOpenRecordComReqDto reqDto) {


        //virtualUsage 2-3-12查开通记录  39738
        OmsSchemeOpenRecord omsSchemeOpenRecord = null;
        QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq = new QuerySchemeOpenRecordDetailReq();
        querySchemeOpenRecordDetailReq.setIsArchive("FALSE");//sourceId:891476_1_39738
        if (reqDto != null) {
            querySchemeOpenRecordDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:891472_1_39738
            querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:891474_1_39738
        }

        /*2-3-12查开通记录[1954]   */
        Assert.isNull(querySchemeOpenRecordDetailReq.getConfSchemeId(), "D2执行更新开通记录(公共)-2-3-12查开通记录-配置方案ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(), "D2执行更新开通记录(公共)-2-3-12查开通记录-租户空间ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordDetailReq.getIsArchive(), "D2执行更新开通记录(公共)-2-3-12查开通记录-是否存档不能为空", false);
        omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("QUANTITY"))) {
            //if(2-3-12查开通记录.授权类型 等于 数量型)  39733

            if ((reqDto != null && reqDto.getCustomField1() != null && reqDto.getCustomField1().equals("DEL"))) {
                //if(D2执行更新开通记录(公共).更新操作场景 等于 删除场景)  39748

//ModelCode: additionOfTwoNum
                CalculateAdditionOfTwoNumsRespDto additionOfTwoNumRes = null;
                if (omsSchemeOpenRecord != null) {
                    CalculateAdditionOfTwoNumsReqDto additionOfTwoNumReq = new CalculateAdditionOfTwoNumsReqDto();
                    additionOfTwoNumReq.setCalcPara2(Double.valueOf("1"));//CUSTOM_CONVENTION//sourceId:891798_1_39766
                    if (omsSchemeOpenRecord != null) {
                        additionOfTwoNumReq.setCalcPara1(omsSchemeOpenRecord.getRemainingQty() != null ? Double.valueOf(omsSchemeOpenRecord.getRemainingQty()) : null);//SimpleFieldAssign//sourceId:891797_1_39766
                    }

                    /*M2计算两个数值相加（特殊方法）[6472]  用户指标数据计算，入参两个数值，计算两数之和 */
                    Assert.isNull(additionOfTwoNumReq.getCalcPara1(), "D2执行更新开通记录(公共)-M2计算两个数值相加（特殊方法）-计算入参1不能为空", false);
                    Assert.isNull(additionOfTwoNumReq.getCalcPara2(), "D2执行更新开通记录(公共)-M2计算两个数值相加（特殊方法）-计算入参2不能为空", false);
                    additionOfTwoNumRes = nbSchemeOpenRecord.calculateAdditionOfTwoNums(additionOfTwoNumReq);


                }
                boolean bOOLEAN;
                if (omsSchemeOpenRecord != null) {
                    OmsSchemeOpenRecord omsSchemeOpenRecord_2 = new OmsSchemeOpenRecord();
                    omsSchemeOpenRecord_2.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:891462_1_39749
                    omsSchemeOpenRecord_2.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:891463_1_39749
                    if (omsSchemeOpenRecord != null) {
                        omsSchemeOpenRecord_2.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:891455_1_39749
                    }
                    if (additionOfTwoNumRes != null) {
                        omsSchemeOpenRecord_2.setRemainingQty(additionOfTwoNumRes.getCalcResult() != null ? additionOfTwoNumRes.getCalcResult().longValue() : null);//SimpleFieldAssign//sourceId:891459_1_39749
                    }

                    /*2-3-12修改开通记录[6471]   */
                    Assert.isNull(omsSchemeOpenRecord_2.getSchOpenRecordId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-开通钥匙ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_2.getOperationInductionId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作人就职记录ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_2.getOperateTime(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作时间不能为空", false);
                    bOOLEAN = mOmsSchemeOpenRecordService.updateSchOpenRecord(omsSchemeOpenRecord_2)/*vcase invoke 本地 method 方法调用;*/;


                }
                if ((!(omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthUseType() != null && omsSchemeOpenRecord.getAuthUseType().equals("USABLE")))) {
                    //if(2-3-12查开通记录.授权使用类型 不等于 可用)  39775

//ModelCode: receptionService
                    ObtainReceiveFieldsRespDto receptionServiceRes = null;
                    ObtainReceiveFieldsReqDto receptionServiceReq = new ObtainReceiveFieldsReqDto();
                    receptionServiceReq.setCustomField("USABLE");//CUSTOM_CONVENTION//sourceId:891970_1_39778
                    receptionServiceReq.setCustomField1("QUANTITY_INS_DISABLED");//CUSTOM_CONVENTION//sourceId:891969_1_39778
                    receptionServiceReq.setCustomField2("EXPIRE__DISABLED");//CUSTOM_CONVENTION//sourceId:891988_1_39778

                    /*M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】[4007]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq.getCustomField(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段不能为空", false);
                    Assert.isNull(receptionServiceReq.getCustomField1(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段1不能为空", false);
                    Assert.isNull(receptionServiceReq.getCustomField2(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段2不能为空", false);
                    receptionServiceRes = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq);


                    boolean bOOLEAN_1;
                    if (omsSchemeOpenRecord != null) {
                        OmsSchemeOpenRecord omsSchemeOpenRecord_3 = new OmsSchemeOpenRecord();
                        omsSchemeOpenRecord_3.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:891462_1_39776
                        omsSchemeOpenRecord_3.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:891463_1_39776
                        if (omsSchemeOpenRecord != null) {
                            omsSchemeOpenRecord_3.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:891455_1_39776
                        }
                        if (receptionServiceRes != null) {
                            omsSchemeOpenRecord_3.setAuthUseType(receptionServiceRes.getCustomField());//SimpleFieldAssign//sourceId:891458_1_39776
                        }

                        /*2-3-12修改开通记录[6471]   */
                        Assert.isNull(omsSchemeOpenRecord_3.getSchOpenRecordId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-开通钥匙ID不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getOperationInductionId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作人就职记录ID不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_3.getOperateTime(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作时间不能为空", false);
                        bOOLEAN_1 = mOmsSchemeOpenRecordService.updateSchOpenRecord(omsSchemeOpenRecord_3)/*vcase invoke 本地 method 方法调用;*/;


                    }
                }
            } else if ((reqDto != null && reqDto.getCustomField1() != null && reqDto.getCustomField1().equals("ADD"))) {
                //elseif(D2执行更新开通记录(公共).更新操作场景 等于 新增场景)  39781

//ModelCode: subtractionOfTwoNum
                CalculateSubtractOfTwoNumComRespDto subtractionOfTwoNumRes = null;
                if (omsSchemeOpenRecord != null) {
                    CalculateSubtractOfTwoNumComReqDto subtractionOfTwoNumReq = new CalculateSubtractOfTwoNumComReqDto();
                    subtractionOfTwoNumReq.setCalcPara2(Double.valueOf("1"));//CUSTOM_CONVENTION//sourceId:891621_1_39784
                    if (omsSchemeOpenRecord != null) {
                        subtractionOfTwoNumReq.setCalcPara1(omsSchemeOpenRecord.getRemainingQty() != null ? Double.valueOf(omsSchemeOpenRecord.getRemainingQty()) : null);//SimpleFieldAssign//sourceId:891620_1_39784
                    }

                    /*M2-授权剩余数自动-1[5167]  用户指标数据计算，入参两个数值，计算两数之差 */
                    Assert.isNull(subtractionOfTwoNumReq.getCalcPara1(), "D2执行更新开通记录(公共)-M2-授权剩余数自动-1-计算入参1不能为空", false);
                    Assert.isNull(subtractionOfTwoNumReq.getCalcPara2(), "D2执行更新开通记录(公共)-M2-授权剩余数自动-1-计算入参2不能为空", false);
                    subtractionOfTwoNumRes = nbSchemeOpenRecord.calculateSubtractOfTwoNumCom(subtractionOfTwoNumReq);


                }
                if ((subtractionOfTwoNumRes != null && subtractionOfTwoNumRes.getCalcResult() <= 0)) {
                    //if(M2-授权剩余数自动-1.计算结果 小于等于 0)  39799

//ModelCode: receptionService
                    ObtainReceiveFieldsRespDto receptionServiceRes_2 = null;
                    ObtainReceiveFieldsReqDto receptionServiceReq_1 = new ObtainReceiveFieldsReqDto();
                    receptionServiceReq_1.setInputNum(Long.valueOf(0));//CUSTOM_CONVENTION//sourceId:891613_1_39807

                    /*M2-约定值为【0】[4007]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq_1.getInputNum(), "D2执行更新开通记录(公共)-M2-约定值为【0】-输入数值（整数型）不能为空", false);
                    receptionServiceRes_2 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_1);


//ModelCode: receptionService
                    ObtainReceiveFieldsRespDto receptionServiceRes_4 = null;
                    ObtainReceiveFieldsReqDto receptionServiceReq_2 = new ObtainReceiveFieldsReqDto();
                    receptionServiceReq_2.setCustomField("USABLE");//CUSTOM_CONVENTION//sourceId:891970_1_39841
                    receptionServiceReq_2.setCustomField1("QUANTITY_INS_DISABLED");//CUSTOM_CONVENTION//sourceId:891969_1_39841
                    receptionServiceReq_2.setCustomField2("EXPIRE__DISABLED");//CUSTOM_CONVENTION//sourceId:891988_1_39841

                    /*M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】[4007]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq_2.getCustomField(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段不能为空", false);
                    Assert.isNull(receptionServiceReq_2.getCustomField1(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段1不能为空", false);
                    Assert.isNull(receptionServiceReq_2.getCustomField2(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段2不能为空", false);
                    receptionServiceRes_4 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_2);


                    boolean bOOLEAN_2;
                    if (omsSchemeOpenRecord != null) {
                        OmsSchemeOpenRecord omsSchemeOpenRecord_4 = new OmsSchemeOpenRecord();
                        omsSchemeOpenRecord_4.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:891462_1_39808
                        omsSchemeOpenRecord_4.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:891463_1_39808
                        if (omsSchemeOpenRecord != null) {
                            omsSchemeOpenRecord_4.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:891455_1_39808
                        }
                        if (receptionServiceRes_2 != null) {
                            omsSchemeOpenRecord_4.setRemainingQty(receptionServiceRes_2.getInputNum());//SimpleFieldAssign//sourceId:891459_1_39808
                        }
                        if (receptionServiceRes_4 != null) {
                            omsSchemeOpenRecord_4.setAuthUseType(receptionServiceRes_4.getCustomField1());//SimpleFieldAssign//sourceId:891458_1_39808
                        }

                        /*2-3-12修改开通记录[6471]   */
                        Assert.isNull(omsSchemeOpenRecord_4.getSchOpenRecordId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-开通钥匙ID不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_4.getOperationInductionId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作人就职记录ID不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_4.getOperateTime(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作时间不能为空", false);
                        bOOLEAN_2 = mOmsSchemeOpenRecordService.updateSchOpenRecord(omsSchemeOpenRecord_4)/*vcase invoke 本地 method 方法调用;*/;


                    }
                } else if ((subtractionOfTwoNumRes != null && subtractionOfTwoNumRes.getCalcResult() > 0)) {
                    //elseif(M2-授权剩余数自动-1.计算结果 大于 0)  39809

//ModelCode: receptionService
                    ObtainReceiveFieldsRespDto receptionServiceRes_5 = null;
                    ObtainReceiveFieldsReqDto receptionServiceReq_3 = new ObtainReceiveFieldsReqDto();
                    receptionServiceReq_3.setCustomField("USABLE");//CUSTOM_CONVENTION//sourceId:891970_1_39842
                    receptionServiceReq_3.setCustomField1("QUANTITY_INS_DISABLED");//CUSTOM_CONVENTION//sourceId:891969_1_39842
                    receptionServiceReq_3.setCustomField2("EXPIRE__DISABLED");//CUSTOM_CONVENTION//sourceId:891988_1_39842

                    /*M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】[4007]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq_3.getCustomField(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段不能为空", false);
                    Assert.isNull(receptionServiceReq_3.getCustomField1(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段1不能为空", false);
                    Assert.isNull(receptionServiceReq_3.getCustomField2(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段2不能为空", false);
                    receptionServiceRes_5 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_3);


                    boolean bOOLEAN_3;
                    if (omsSchemeOpenRecord != null) {
                        OmsSchemeOpenRecord omsSchemeOpenRecord_5 = new OmsSchemeOpenRecord();
                        omsSchemeOpenRecord_5.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:891462_1_39810
                        omsSchemeOpenRecord_5.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:891463_1_39810
                        if (omsSchemeOpenRecord != null) {
                            omsSchemeOpenRecord_5.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:891455_1_39810
                        }
                        if (subtractionOfTwoNumRes != null) {
                            omsSchemeOpenRecord_5.setRemainingQty(subtractionOfTwoNumRes.getCalcResult() != null ? subtractionOfTwoNumRes.getCalcResult().longValue() : null);//SimpleFieldAssign//sourceId:891459_1_39810
                        }
                        if (receptionServiceRes_5 != null) {
                            omsSchemeOpenRecord_5.setAuthUseType(receptionServiceRes_5.getCustomField());//SimpleFieldAssign//sourceId:891458_1_39810
                        }

                        /*2-3-12修改开通记录[6471]   */
                        Assert.isNull(omsSchemeOpenRecord_5.getSchOpenRecordId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-开通钥匙ID不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_5.getOperationInductionId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作人就职记录ID不能为空", false);
                        Assert.isNull(omsSchemeOpenRecord_5.getOperateTime(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作时间不能为空", false);
                        bOOLEAN_3 = mOmsSchemeOpenRecordService.updateSchOpenRecord(omsSchemeOpenRecord_5)/*vcase invoke 本地 method 方法调用;*/;


                    }
                }
            }
        } else if ((omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("CYCLE_TIME") || omsSchemeOpenRecord != null && omsSchemeOpenRecord.getAuthType() != null && omsSchemeOpenRecord.getAuthType().equals("FIXED_TIME")) && (reqDto != null && reqDto.getCustomField1() != null && reqDto.getCustomField1().equals("UPDATE"))) {
            //elseif((2-3-12查开通记录.授权类型 等于 周期时间型 or 2-3-12查开通记录.授权类型 等于 固定时间型) and D2执行更新开通记录(公共).更新操作场景 等于 更新场景)  39819

            CheckTimeScopeSearchComRespDto checkTimeScopeSearchComRespDto = null;
            if (omsSchemeOpenRecord != null) {
                CheckTimeScopeSearchComReqDto checkTimeScopeSearchComReqDto = new CheckTimeScopeSearchComReqDto();
                checkTimeScopeSearchComReqDto.setCurrentTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:892253_1_39822
                if (omsSchemeOpenRecord != null) {
                    checkTimeScopeSearchComReqDto.setCompareTime(omsSchemeOpenRecord.getEndTime());//SimpleFieldAssign//sourceId:892255_1_39822
                }

                /*D2判断是否过期[3297]   */
                Assert.isNull(checkTimeScopeSearchComReqDto.getCurrentTime(), "D2执行更新开通记录(公共)-D2判断是否过期-当前时间不能为空", false);
                Assert.isNull(checkTimeScopeSearchComReqDto.getCompareTime(), "D2执行更新开通记录(公共)-D2判断是否过期-比较时间不能为空", false);
                checkTimeScopeSearchComRespDto = divineDataService.checkTimeScopeSearchCom(checkTimeScopeSearchComReqDto)/*vcase invoke isSameApp*/;


            }
            if ((checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("LATER"))) {
                //if(D2判断是否过期.时间比较结果 等于 之后（大于）)  39823

//ModelCode: receptionService
                ObtainReceiveFieldsRespDto receptionServiceRes_6 = null;
                ObtainReceiveFieldsReqDto receptionServiceReq_4 = new ObtainReceiveFieldsReqDto();
                receptionServiceReq_4.setCustomField("USABLE");//CUSTOM_CONVENTION//sourceId:891970_1_39825
                receptionServiceReq_4.setCustomField1("QUANTITY_INS_DISABLED");//CUSTOM_CONVENTION//sourceId:891969_1_39825
                receptionServiceReq_4.setCustomField2("EXPIRE__DISABLED");//CUSTOM_CONVENTION//sourceId:891988_1_39825

                /*M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】[4007]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_4.getCustomField(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段不能为空", false);
                Assert.isNull(receptionServiceReq_4.getCustomField1(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段1不能为空", false);
                Assert.isNull(receptionServiceReq_4.getCustomField2(), "D2执行更新开通记录(公共)-M2-约定自定义【可用】自定义1【数量不可用】自定义2【到期不可用】-自定义字段2不能为空", false);
                receptionServiceRes_6 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_4);


                boolean bOOLEAN_4;
                if (omsSchemeOpenRecord != null) {
                    OmsSchemeOpenRecord omsSchemeOpenRecord_6 = new OmsSchemeOpenRecord();
                    omsSchemeOpenRecord_6.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:891462_1_39824
                    omsSchemeOpenRecord_6.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:891463_1_39824
                    if (omsSchemeOpenRecord != null) {
                        omsSchemeOpenRecord_6.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:891455_1_39824
                    }
                    if (receptionServiceRes_6 != null) {
                        omsSchemeOpenRecord_6.setAuthUseType(receptionServiceRes_6.getCustomField2());//SimpleFieldAssign//sourceId:891458_1_39824
                    }

                    /*2-3-12修改开通记录[6471]   */
                    Assert.isNull(omsSchemeOpenRecord_6.getSchOpenRecordId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-开通钥匙ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_6.getOperationInductionId(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作人就职记录ID不能为空", false);
                    Assert.isNull(omsSchemeOpenRecord_6.getOperateTime(), "D2执行更新开通记录(公共)-2-3-12修改开通记录-操作时间不能为空", false);
                    bOOLEAN_4 = mOmsSchemeOpenRecordService.updateSchOpenRecord(omsSchemeOpenRecord_6)/*vcase invoke 本地 method 方法调用;*/;


                }
            }
        }
        ImplementUpdateSchOpenRecordComRespDto retData = new ImplementUpdateSchOpenRecordComRespDto();


        return retData;
    }

    /**
     * D2新增开通记录并授权(公共)[3102]
     * gen by moon at 5/24/2023, 3:34:51 AM
     */
    @Trace(operationName = "D2新增开通记录并授权(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddOpenRecordAuthorizationComRespDto addOpenRecordAuthorizationCom(AddOpenRecordAuthorizationComReqDto reqDto) {


        AddSchemeOpenRecordComRespDto addSchemeOpenRecordComRespDto_1 = null;
        String string_1 = null;
//virtualUsage D2-3新增开通记录(公共)  39867
        AddSchemeOpenRecordComRespDto addSchemeOpenRecordComRespDto = null;
        AddSchemeOpenRecordComReqDto addSchemeOpenRecordComReqDto = new AddSchemeOpenRecordComReqDto();
        if (reqDto != null) {
            addSchemeOpenRecordComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:894129_1_39867
            addSchemeOpenRecordComReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:894130_1_39867
            addSchemeOpenRecordComReqDto.setApplObjType(reqDto.getApplexType());//SimpleFieldAssign//sourceId:931096_1_39867
            addSchemeOpenRecordComReqDto.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932174_1_39867
            addSchemeOpenRecordComReqDto.setAuthType(reqDto.getAuthType());//SimpleFieldAssign//sourceId:894131_1_39867
            addSchemeOpenRecordComReqDto.setAuthorizationNum(reqDto.getAuthorizationNum());//SimpleFieldAssign//sourceId:894132_1_39867
            addSchemeOpenRecordComReqDto.setAuthUnit(reqDto.getAuthUnit());//SimpleFieldAssign//sourceId:894133_1_39867
            addSchemeOpenRecordComReqDto.setStartTime(reqDto.getStartTime());//SimpleFieldAssign//sourceId:894134_1_39867
            addSchemeOpenRecordComReqDto.setEndTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:894135_1_39867
            addSchemeOpenRecordComReqDto.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:894136_1_39867
            addSchemeOpenRecordComReqDto.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:894137_1_39867
            addSchemeOpenRecordComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:894138_1_39867
        }

        /*D2-3新增开通记录(公共)[2116]   */
        Assert.isNull(addSchemeOpenRecordComReqDto.getConfSchemeId(), "D2新增开通记录并授权(公共)-D2-3新增开通记录(公共)-配置方案ID 不能为空", false);
        Assert.isNull(addSchemeOpenRecordComReqDto.getConfSchemeCode(), "D2新增开通记录并授权(公共)-D2-3新增开通记录(公共)-配置方案标识不能为空", false);
        Assert.isNull(addSchemeOpenRecordComReqDto.getApplObjType(), "D2新增开通记录并授权(公共)-D2-3新增开通记录(公共)-开通对象类型编码不能为空", false);
        Assert.isNull(addSchemeOpenRecordComReqDto.getAuthorizationKeyTypeCode(), "D2新增开通记录并授权(公共)-D2-3新增开通记录(公共)-开通钥匙类型标识不能为空", false);
        Assert.isNull(addSchemeOpenRecordComReqDto.getIsMainConfScheme(), "D2新增开通记录并授权(公共)-D2-3新增开通记录(公共)-是否主配置方案不能为空", false);
        Assert.isNull(addSchemeOpenRecordComReqDto.getTenantSpaceId(), "D2新增开通记录并授权(公共)-D2-3新增开通记录(公共)-租户空间ID不能为空", false);
        Assert.isNull(addSchemeOpenRecordComReqDto.getSubjectLifeCycle(), "D2新增开通记录并授权(公共)-D2-3新增开通记录(公共)-主体生命周期不能为空", false);
        addSchemeOpenRecordComRespDto = addSchemeOpenRecordCom(addSchemeOpenRecordComReqDto)/*vcase invoke 同服务,同domain*/;


        addSchemeOpenRecordComRespDto_1 = addSchemeOpenRecordComRespDto;
//virtualUsage 2-3-13新增使用关系  39874
        String string = null;
        if (addSchemeOpenRecordComRespDto != null) {
            OmsConfApplexRel omsConfApplexRel = new OmsConfApplexRel();
            if (addSchemeOpenRecordComRespDto != null) {
                omsConfApplexRel.setSchOpenRecordId(addSchemeOpenRecordComRespDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:461230_1_39874
            }
            if (reqDto != null) {
                omsConfApplexRel.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:379607_1_39874
                omsConfApplexRel.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:106700_1_39874
                omsConfApplexRel.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:106699_1_39874
                omsConfApplexRel.setApplexName(reqDto.getApplexName());//SimpleFieldAssign//sourceId:913959_1_39874
                omsConfApplexRel.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932171_1_39874
                omsConfApplexRel.setApplexType(reqDto.getApplexType());//SimpleFieldAssign//sourceId:106698_1_39874
                omsConfApplexRel.setAscriptionSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:106703_1_39874
                omsConfApplexRel.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:106701_1_39874
            }

            /*2-3-13新增使用关系[2120]   */
            Assert.isNull(omsConfApplexRel.getSchOpenRecordId(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系- 开通钥匙ID不能为空", false);
            Assert.isNull(omsConfApplexRel.getConfSchemeId(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系-配置方案ID不能为空", false);
            Assert.isNull(omsConfApplexRel.getConfSchemeCode(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系-配置方案标识不能为空", false);
            Assert.isNull(omsConfApplexRel.getApplexId(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系-开通对象ID不能为空", false);
            Assert.isNull(omsConfApplexRel.getApplexName(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系-冗余开通对象名称不能为空", false);
            Assert.isNull(omsConfApplexRel.getAuthorizationKeyTypeCode(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系-开通钥匙类型标识不能为空", false);
            Assert.isNull(omsConfApplexRel.getApplexType(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系-开通对象类型编码不能为空", false);
            Assert.isNull(omsConfApplexRel.getAscriptionSpaceId(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系-归属空间ID不能为空", false);
            Assert.isNull(omsConfApplexRel.getSubjectLifeCycle(), "D2新增开通记录并授权(公共)-2-3-13新增使用关系-主体生命周期不能为空", false);
            string = mOmsConfApplexRelService.addApplexConrel(omsConfApplexRel)/*vcase invoke 本地 method 方法调用;*/;


            string_1 = string;
        }
//virtualUsage 2-3-07查标准答案  39878
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
        queryConfItemResultListReq.setIsPlatData("TRUE");//sourceId:308064_1_39878
        queryConfItemResultListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:106707_1_39878
        if (reqDto != null) {
            queryConfItemResultListReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:449188_1_39878
        }

        /*2-3-07查标准答案[1940]   */
        Assert.isNull(queryConfItemResultListReq.getConfSchemeId(), "D2新增开通记录并授权(公共)-2-3-07查标准答案-配置方案ID 不能为空", false);
        Assert.isNull(queryConfItemResultListReq.getIsPlatData(), "D2新增开通记录并授权(公共)-2-3-07查标准答案-是否标准答案不能为空", false);
        Assert.isNull(queryConfItemResultListReq.getSubjectLifeCycle(), "D2新增开通记录并授权(公共)-2-3-07查标准答案-主体生命周期不能为空", false);
        listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq)/*vcase invoke 本地 method 方法调用;*/;
        Assert.isTrue(listOmsConfSchemeOptionResult == null || CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) || listOmsConfSchemeOptionResult == null || CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) || listOmsConfSchemeOptionResult.size() == 0, "找不到数据，系统异常", false);


//virtualUsage 2-3-07克隆标准答案  39879
        boolean bOOLEAN;
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0 && addSchemeOpenRecordComRespDto != null && string != null) {
            List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_2 = new ArrayList<>();
            if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                AddSchemeOpenRecordComRespDto finalAddSchemeOpenRecordComRespDto = addSchemeOpenRecordComRespDto;
                String finalString = string;
                listOmsConfSchemeOptionResult_2 = //objList-to-objLists
                        listOmsConfSchemeOptionResult.stream().map(item -> {
                            OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                            elm.setEndValue(item.getEndValue());//SimpleFieldAssign//sourceId:58249_2_39879
                            elm.setExtensionField1(item.getExtensionField1());//SimpleFieldAssign//sourceId:61426_2_39879
                            elm.setExtensionField2(item.getExtensionField2());//SimpleFieldAssign//sourceId:61427_2_39879
                            elm.setExtensionField3(item.getExtensionField3());//SimpleFieldAssign//sourceId:61428_2_39879
                            elm.setExtensionField4(item.getExtensionField4());//SimpleFieldAssign//sourceId:199687_2_39879
                            elm.setClassConfItemId(item.getClassConfItemId());//SimpleFieldAssign//sourceId:94435_2_39879
                            elm.setConfOptionRshipId(item.getConfOptionRshipId());//SimpleFieldAssign//sourceId:58252_2_39879
                            elm.setIsPlatData("FALSE");//sourceId:58253_2_39879
                            elm.setIsCeResult("FALSE");//sourceId:58254_2_39879
                            elm.setIsUltrResult("TRUE");//sourceId:209925_2_39879
                            elm.setIsInitialScheme(item.getIsInitialScheme());//SimpleFieldAssign//sourceId:58266_2_39879
                            elm.setIsSingleResult(item.getIsSingleResult());//SimpleFieldAssign//sourceId:58267_2_39879
                            elm.setOptionType(item.getOptionType());//SimpleFieldAssign//sourceId:58250_2_39879
                            elm.setResultType(item.getResultType());//SimpleFieldAssign//sourceId:58248_2_39879
                            elm.setOptionThrowPlace(item.getOptionThrowPlace());//SimpleFieldAssign//sourceId:89884_2_39879
                            elm.setConfOptionSortNum(item.getConfOptionSortNum());//SimpleFieldAssign//sourceId:61429_2_39879
                            elm.setConfOptionCode(item.getConfOptionCode());//SimpleFieldAssign//sourceId:58260_2_39879
                            elm.setConfOptionName(item.getConfOptionName());//SimpleFieldAssign//sourceId:58261_2_39879
                            elm.setConfItemCode(item.getConfItemCode());//SimpleFieldAssign//sourceId:58251_2_39879
                            elm.setShortName(item.getShortName());//SimpleFieldAssign//sourceId:58262_2_39879
                            elm.setConfItemClassCode(item.getConfItemClassCode());//SimpleFieldAssign//sourceId:58263_2_39879
                            elm.setConfItemClassName(item.getConfItemClassName());//SimpleFieldAssign//sourceId:58264_2_39879
                            elm.setConfSchemeName(item.getConfSchemeName());//SimpleFieldAssign//sourceId:58265_2_39879
                            if (finalAddSchemeOpenRecordComRespDto != null) {
                                elm.setSchOpenRecordId(finalAddSchemeOpenRecordComRespDto.getSchOpenRecordId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:94993_2_39879
                            }
                            if (finalString != null) {
                                elm.setApplexRelId(finalString);//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:94992_2_39879
                            }
                            if (reqDto != null) {
                                elm.setResultAspObjType(reqDto.getApplexType());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58255_2_39879
                                elm.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:199678_2_39879
                                elm.setResultAspObjId(reqDto.getApplexId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58256_2_39879
                                elm.setConfSchemeId(reqDto.getConfSchemeId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58257_2_39879
                                elm.setConfSchemeCode(reqDto.getConfSchemeCode());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58258_2_39879
                                elm.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:58259_2_39879
                            }
                            return elm;
                        }).collect(Collectors.toList());//objList-to-objLists//sourceId:106721_1_39879
            }

            /*2-3-07克隆标准答案[2031]   */

            bOOLEAN = mOmsConfSchemeOptionResultService.batchAddConfItemResult(listOmsConfSchemeOptionResult_2)/*vcase invoke 本地 method 方法调用;*/;


        }
        AddOpenRecordAuthorizationComRespDto retData = new AddOpenRecordAuthorizationComRespDto();
        if (addSchemeOpenRecordComRespDto_1 != null) {
            retData.setSchOpenRecordId(addSchemeOpenRecordComRespDto_1.getSchOpenRecordId());//SimpleFieldAssign//sourceId:894264_1
        }
        if (string_1 != null) {
            retData.setApplexRelId(string_1);//SimpleFieldAssign//sourceId:106735_1
        }


        return retData;
    }

    /**
     * D2修改开通记录(公共)[6484]
     * gen by moon at 5/13/2023, 5:02:47 AM
     */
    @Trace(operationName = "D2修改开通记录(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateSchOpenRecordComRespDto updateSchOpenRecordCom(UpdateSchOpenRecordComReqDto reqDto) {


        //virtualUsage 2-3-12修改开通记录  39965
        boolean bOOLEAN;
        OmsSchemeOpenRecord omsSchemeOpenRecord = new OmsSchemeOpenRecord();
        omsSchemeOpenRecord.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:896172_1_39965
        omsSchemeOpenRecord.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:896173_1_39965
        if (reqDto != null) {
            omsSchemeOpenRecord.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:896165_1_39965
            omsSchemeOpenRecord.setAuthType(reqDto.getAuthType());//SimpleFieldAssign//sourceId:896167_1_39965
            omsSchemeOpenRecord.setRemainingQty(reqDto.getRemainingQty());//SimpleFieldAssign//sourceId:896169_1_39965
            omsSchemeOpenRecord.setAuthUnit(reqDto.getAuthUnit());//SimpleFieldAssign//sourceId:896166_1_39965
            omsSchemeOpenRecord.setStartTime(reqDto.getStartTime());//SimpleFieldAssign//sourceId:896170_1_39965
            omsSchemeOpenRecord.setEndTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:896171_1_39965
            omsSchemeOpenRecord.setAuthUseType(reqDto.getAuthUseType());//SimpleFieldAssign//sourceId:896168_1_39965
            omsSchemeOpenRecord.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:896376_1_39965
        }

        /*2-3-12修改开通记录[6471]   */
        Assert.isNull(omsSchemeOpenRecord.getSchOpenRecordId(), "D2修改开通记录(公共)-2-3-12修改开通记录-开通钥匙ID不能为空", false);
        Assert.isNull(omsSchemeOpenRecord.getOperationInductionId(), "D2修改开通记录(公共)-2-3-12修改开通记录-操作人就职记录ID不能为空", false);
        Assert.isNull(omsSchemeOpenRecord.getOperateTime(), "D2修改开通记录(公共)-2-3-12修改开通记录-操作时间不能为空", false);
        bOOLEAN = mOmsSchemeOpenRecordService.updateSchOpenRecord(omsSchemeOpenRecord)/*vcase invoke 本地 method 方法调用;*/;


        if ((reqDto != null && reqDto.getSubjectLifeCycle() != null && reqDto.getSubjectLifeCycle().equals("CURRENTLY_VALID"))) {
            //if(D2修改开通记录(公共).主体生命周期 等于 当前有效)  39966

//AddSoftwareAuthorizationComRespDto addSoftwareAuthorizationComRespDto = null;
//    Object addSoftwareAuthorizationComReqDto=new Object();
//  if(reqDto!=null){
//      addSoftwareAuthorizationComReqDto=reqDto.getSchOpenRecordId();;//SimpleFieldAssign//sourceId:933600_1_41491
//addSoftwareAuthorizationComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:933601_1_41491
//    }
//
//    /*D1新增软件授权证书(公共)[6609]   */
//    Assert.isNull(addSoftwareAuthorizationComReqDto,"D2修改开通记录(公共)-D1新增软件授权证书(公共)-开通钥匙ID不能为空",false);
//Assert.isNull(addSoftwareAuthorizationComReqDto,"D2修改开通记录(公共)-D1新增软件授权证书(公共)-主体生命周期不能为空",false);
//      addSoftwareAuthorizationComRespDto = baseSecurityService.addSoftwareAuthorizationCom(addSoftwareAuthorizationComReqDto)/*vcase invoke 跨dubbo调用;*/;


            boolean bOOLEAN_1;
            OmsConfApplexRel omsConfApplexRel = new OmsConfApplexRel();
            omsConfApplexRel.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:896378_1_39967
            if (reqDto != null) {
                omsConfApplexRel.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:896377_1_39967
            }

            /*2-3-13将使用关系发布生效[2374]   */
            Assert.isNull(omsConfApplexRel.getApplexRelId(), "D2修改开通记录(公共)-2-3-13将使用关系发布生效-开通对象使用关系ID不能为空", false);
            Assert.isNull(omsConfApplexRel.getSubjectLifeCycle(), "D2修改开通记录(公共)-2-3-13将使用关系发布生效-主体生命周期不能为空", false);
            bOOLEAN_1 = mOmsConfApplexRelService.updateApplexConrel(omsConfApplexRel)/*vcase invoke 本地 method 方法调用;*/;


            List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
            QueryConfItemMatchAnswerListReq queryConfItemMatchAnswerListReq = new QueryConfItemMatchAnswerListReq();
            queryConfItemMatchAnswerListReq.setIsPlatData("FALSE");//sourceId:896384_1_39968
            queryConfItemMatchAnswerListReq.setSubjectLifeCycle("EDITING");//sourceId:896398_1_39968
            if (reqDto != null) {
                queryConfItemMatchAnswerListReq.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:896397_1_39968
                queryConfItemMatchAnswerListReq.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:896396_1_39968
                queryConfItemMatchAnswerListReq.setResultAspObjId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:896382_1_39968
            }

            /*2-3-07查正在编辑的克隆答案[2506]   */
            Assert.isNull(queryConfItemMatchAnswerListReq.getSchOpenRecordId(), "D2修改开通记录(公共)-2-3-07查正在编辑的克隆答案-方案开通记录ID不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerListReq.getApplexRelId(), "D2修改开通记录(公共)-2-3-07查正在编辑的克隆答案-使用关系ID不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerListReq.getResultAspObjId(), "D2修改开通记录(公共)-2-3-07查正在编辑的克隆答案-开通对象ID不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerListReq.getIsPlatData(), "D2修改开通记录(公共)-2-3-07查正在编辑的克隆答案-是否标准答案不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerListReq.getSubjectLifeCycle(), "D2修改开通记录(公共)-2-3-07查正在编辑的克隆答案-主体生命周期不能为空", false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemMatchAnswerList(queryConfItemMatchAnswerListReq)/*vcase invoke 本地 method 方法调用;*/;


            boolean bOOLEAN_2;
            if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
                List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_2 = new ArrayList<>();
                if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                    listOmsConfSchemeOptionResult_2 = //objList-to-objLists
                            listOmsConfSchemeOptionResult.stream().map(item -> {
                                OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                                elm.setOptionResultId(item.getOptionResultId());//SimpleFieldAssign//sourceId:191734_2_39969
                                elm.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:191735_2_39969
                                return elm;
                            }).collect(Collectors.toList());//objList-to-objLists//sourceId:896400_1_39969
                }

                /*2-3-07将克隆答案发布生效[2042]   */

                bOOLEAN_2 = mOmsConfSchemeOptionResultService.batchUpdateConfItemResult(listOmsConfSchemeOptionResult_2)/*vcase invoke 本地 method 方法调用;*/;


            }
        }
        UpdateSchOpenRecordComRespDto retData = new UpdateSchOpenRecordComRespDto();


        return retData;
    }

    /**
     * D2-3查使用关系详情(公共)[2508]
     * gen by moon at 5/23/2023, 8:02:16 PM
     */
    @Trace(operationName = "D2-3查使用关系详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryApplexConrelDetailComRespDto queryApplexConrelDetailCom(QueryApplexConrelDetailComReqDto reqDto) {


        OmsConfApplexRel omsConfApplexRel_1 = null;
//步骤0: 2-3-13查询应用实例配置关系详情 - queryApplexConrelDetail
        OmsConfApplexRel omsConfApplexRel = null;
        QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
        queryApplexConrelDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:77769_1
        if (reqDto != null) {
            queryApplexConrelDetailReq.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:913147_1
            queryApplexConrelDetailReq.setApplexId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:77767_1
            queryApplexConrelDetailReq.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:77768_1
        }

        /*2-3-13查询应用实例配置关系详情[2122]   */
        Assert.isNull(queryApplexConrelDetailReq.getAscriptionSpaceId(), "D2-3查使用关系详情(公共)-2-3-13查询应用实例配置关系详情-归属空间ID不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getSubjectLifeCycle(), "D2-3查使用关系详情(公共)-2-3-13查询应用实例配置关系详情-主体生命周期不能为空", false);
        omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        omsConfApplexRel_1 = omsConfApplexRel;

        QueryApplexConrelDetailComRespDto retData = new QueryApplexConrelDetailComRespDto();
        if (omsConfApplexRel_1 != null) {
            retData.setApplexRelId(omsConfApplexRel_1.getApplexRelId());//SimpleFieldAssign//sourceId:913155_1
            retData.setApplexId(omsConfApplexRel_1.getApplexId());//SimpleFieldAssign//sourceId:77788_1
            retData.setConfSchemeId(omsConfApplexRel_1.getConfSchemeId());//SimpleFieldAssign//sourceId:77791_1
            retData.setApplexType(omsConfApplexRel_1.getApplexType());//SimpleFieldAssign//sourceId:978676_1
        }


        return retData;
    }

    /**
     * D2修改方案开通记录(公共)[6540]
     * gen by moon at 5/9/2023, 4:30:52 PM
     */
    @Trace(operationName = "D2修改方案开通记录(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateSchemeOpenRecordComRespDto updateSchemeOpenRecordCom(UpdateSchemeOpenRecordComReqDto reqDto) {


        //步骤0: 2-3-12修改方案开通记录 - updateSchemeOpenRecord
        boolean bOOLEAN;
        OmsSchemeOpenRecord omsSchemeOpenRecord = new OmsSchemeOpenRecord();
        if (reqDto != null) {
            omsSchemeOpenRecord.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:913117_1
            omsSchemeOpenRecord.setRemainingQty(reqDto.getRemainingQty());//SimpleFieldAssign//sourceId:913123_1
            omsSchemeOpenRecord.setAuthUseType(reqDto.getAuthUseType());//SimpleFieldAssign//sourceId:913122_1
        }

        /*2-3-12修改方案开通记录[1952]   */
        Assert.isNull(omsSchemeOpenRecord.getSchOpenRecordId(), "D2修改方案开通记录(公共)-2-3-12修改方案开通记录-开通钥匙ID不能为空", false);
        bOOLEAN = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord)/*vcase invoke 本地 method 方法调用;*/;


        UpdateSchemeOpenRecordComRespDto retData = new UpdateSchemeOpenRecordComRespDto();


        return retData;
    }

    /**
     * D2查询开通对象使用关系列表[6543]
     * gen by moon at 5/9/2023, 6:31:04 PM
     */
    @Trace(operationName = "D2查询开通对象使用关系列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOpenObjectUsageRelationshipListRespDto queryOpenObjectUsageRelationshipList(QueryOpenObjectUsageRelationshipListReqDto reqDto) {


        List<OmsConfApplexRel> listOmsConfApplexRel_1 = new ArrayList<>();
//步骤0: 2-3-13查询应用实例配置关系列表 - queryApplexConrelList
        List<OmsConfApplexRel> listOmsConfApplexRel = new ArrayList<>();
        QueryApplexConrelListReq queryApplexConrelListReq = new QueryApplexConrelListReq();
        queryApplexConrelListReq.setIsArchive("FALSE");//sourceId:913915_1
        if (reqDto != null) {
            queryApplexConrelListReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:913917_1
            queryApplexConrelListReq.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:913914_1
        }

        /*2-3-13查询应用实例配置关系列表[2124]   */
        Assert.isNull(queryApplexConrelListReq.getConfSchemeId(), "D2查询开通对象使用关系列表-2-3-13查询应用实例配置关系列表-配置方案ID不能为空", false);
        Assert.isNull(queryApplexConrelListReq.getAscriptionSpaceId(), "D2查询开通对象使用关系列表-2-3-13查询应用实例配置关系列表-归属空间ID不能为空", false);
        Assert.isNull(queryApplexConrelListReq.getIsArchive(), "D2查询开通对象使用关系列表-2-3-13查询应用实例配置关系列表-是否存档不能为空", false);
        listOmsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelList(queryApplexConrelListReq)/*vcase invoke 本地 method 方法调用;*/;


        listOmsConfApplexRel_1 = listOmsConfApplexRel;

        QueryOpenObjectUsageRelationshipListRespDto retData = new QueryOpenObjectUsageRelationshipListRespDto();
        retData.setOpenObjectUsageRelationshipList(listOmsConfApplexRel_1.stream().map(item -> BeanUtil.toBean(item, OpenObjectUsageRelationshipDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:913920_1


        return retData;
    }

    /**
     * D2执行回写单条定制答案(公共)[6653]
     * gen by moon at 5/14/2023, 2:44:04 AM
     */
    @Trace(operationName = "D2执行回写单条定制答案(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementWriteBackSingleCustomResultComRespDto implementWriteBackSingleCustomResultCom(ImplementWriteBackSingleCustomResultComReqDto reqDto) {


        //virtualUsage 2-3-07查克隆答案（原答案)  41615
        OmsConfSchemeOptionResult omsConfSchemeOptionResult = null;
        QueryConfItemMatchAnswerDetailReq queryConfItemMatchAnswerDetailReq = new QueryConfItemMatchAnswerDetailReq();
        queryConfItemMatchAnswerDetailReq.setIsPlatData("FALSE");//sourceId:938729_1_41615
        queryConfItemMatchAnswerDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:938730_1_41615
        if (reqDto != null) {
            queryConfItemMatchAnswerDetailReq.setResultAspObjId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:938728_1_41615
            queryConfItemMatchAnswerDetailReq.setConfOptionCode(reqDto.getConfOptionCode());//SimpleFieldAssign//sourceId:938937_1_41615
            queryConfItemMatchAnswerDetailReq.setConfItemCode(reqDto.getConfItemCode());//SimpleFieldAssign//sourceId:938727_1_41615
        }

        /*2-3-07查克隆答案（原答案)[2487]   */
        Assert.isNull(queryConfItemMatchAnswerDetailReq.getResultAspObjId(), "D2执行回写单条定制答案(公共)-2-3-07查克隆答案（原答案)-开通对象ID不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailReq.getConfOptionCode(), "D2执行回写单条定制答案(公共)-2-3-07查克隆答案（原答案)-选项标识不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailReq.getConfItemCode(), "D2执行回写单条定制答案(公共)-2-3-07查克隆答案（原答案)-配置项标识不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailReq.getIsPlatData(), "D2执行回写单条定制答案(公共)-2-3-07查克隆答案（原答案)-是否标准答案不能为空", false);
        Assert.isNull(queryConfItemMatchAnswerDetailReq.getSubjectLifeCycle(), "D2执行回写单条定制答案(公共)-2-3-07查克隆答案（原答案)-主体生命周期不能为空", false);
        omsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemMatchAnswerDetail(queryConfItemMatchAnswerDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((omsConfSchemeOptionResult != null)) {
            //if(2-3-07查克隆答案（原答案).出参 值不等于空 )  41641

            boolean bOOLEAN;
            if (omsConfSchemeOptionResult != null) {
                OmsConfSchemeOptionResult omsConfSchemeOptionResult_2 = new OmsConfSchemeOptionResult();
                omsConfSchemeOptionResult_2.setIsCeResult("TRUE");//sourceId:938935_1_41642
                if (omsConfSchemeOptionResult != null) {
                    omsConfSchemeOptionResult_2.setOptionResultId(omsConfSchemeOptionResult.getOptionResultId());//SimpleFieldAssign//sourceId:938674_1_41642
                }
                if (reqDto != null) {
                    omsConfSchemeOptionResult_2.setEndValue(reqDto.getEndValue());//SimpleFieldAssign//sourceId:938675_1_41642
                }

                /*2-3-07修改克隆答案[6657]   */
                Assert.isNull(omsConfSchemeOptionResult_2.getOptionResultId(), "D2执行回写单条定制答案(公共)-2-3-07修改克隆答案-答案ID不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_2.getEndValue(), "D2执行回写单条定制答案(公共)-2-3-07修改克隆答案-答案值不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_2.getIsCeResult(), "D2执行回写单条定制答案(公共)-2-3-07修改克隆答案-是否定制结果不能为空", false);
                bOOLEAN = mOmsConfSchemeOptionResultService.updateCloneResult(omsConfSchemeOptionResult_2)/*vcase invoke 本地 method 方法调用;*/;


            }
            String string = null;
            if (omsConfSchemeOptionResult != null) {
                OmsConfSchemeOptionResult omsConfSchemeOptionResult_3 = new OmsConfSchemeOptionResult();
                omsConfSchemeOptionResult_3.setIsPlatData("FALSE");//sourceId:938645_1_41643
                omsConfSchemeOptionResult_3.setSubjectLifeCycle("ARCHIVING");//sourceId:938662_1_41643
                omsConfSchemeOptionResult_3.setIsArchive("TRUE");//sourceId:938663_1_41643
                if (omsConfSchemeOptionResult != null) {
                    omsConfSchemeOptionResult_3.setEndValue(omsConfSchemeOptionResult.getEndValue());//SimpleFieldAssign//sourceId:938633_1_41643
                    omsConfSchemeOptionResult_3.setExtensionField1(omsConfSchemeOptionResult.getExtensionField1());//SimpleFieldAssign//sourceId:938634_1_41643
                    omsConfSchemeOptionResult_3.setExtensionField2(omsConfSchemeOptionResult.getExtensionField2());//SimpleFieldAssign//sourceId:938635_1_41643
                    omsConfSchemeOptionResult_3.setExtensionField3(omsConfSchemeOptionResult.getExtensionField3());//SimpleFieldAssign//sourceId:938636_1_41643
                    omsConfSchemeOptionResult_3.setExtensionField4(omsConfSchemeOptionResult.getExtensionField4());//SimpleFieldAssign//sourceId:938637_1_41643
                    omsConfSchemeOptionResult_3.setOptionThrowPlace(omsConfSchemeOptionResult.getOptionThrowPlace());//SimpleFieldAssign//sourceId:938651_1_41643
                    omsConfSchemeOptionResult_3.setApplexRelId(omsConfSchemeOptionResult.getApplexRelId());//SimpleFieldAssign//sourceId:938641_1_41643
                    omsConfSchemeOptionResult_3.setSchOpenRecordId(omsConfSchemeOptionResult.getSchOpenRecordId());//SimpleFieldAssign//sourceId:938640_1_41643
                    omsConfSchemeOptionResult_3.setResultAspObjType(omsConfSchemeOptionResult.getResultAspObjType());//SimpleFieldAssign//sourceId:938642_1_41643
                    omsConfSchemeOptionResult_3.setAuthorizationKeyTypeCode(omsConfSchemeOptionResult.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:938644_1_41643
                    omsConfSchemeOptionResult_3.setIsCeResult(omsConfSchemeOptionResult.getIsCeResult());//SimpleFieldAssign//sourceId:938646_1_41643
                    omsConfSchemeOptionResult_3.setIsInitialScheme(omsConfSchemeOptionResult.getIsInitialScheme());//SimpleFieldAssign//sourceId:938647_1_41643
                    omsConfSchemeOptionResult_3.setOptionType(omsConfSchemeOptionResult.getOptionType());//SimpleFieldAssign//sourceId:938648_1_41643
                    omsConfSchemeOptionResult_3.setResultType(omsConfSchemeOptionResult.getResultType());//SimpleFieldAssign//sourceId:938649_1_41643
                    omsConfSchemeOptionResult_3.setIsSingleResult(omsConfSchemeOptionResult.getIsSingleResult());//SimpleFieldAssign//sourceId:938650_1_41643
                    omsConfSchemeOptionResult_3.setConfOptionSortNum(omsConfSchemeOptionResult.getConfOptionSortNum());//SimpleFieldAssign//sourceId:938652_1_41643
                    omsConfSchemeOptionResult_3.setConfOptionRshipId(omsConfSchemeOptionResult.getConfOptionRshipId());//SimpleFieldAssign//sourceId:938639_1_41643
                    omsConfSchemeOptionResult_3.setClassConfItemId(omsConfSchemeOptionResult.getClassConfItemId());//SimpleFieldAssign//sourceId:938638_1_41643
                    omsConfSchemeOptionResult_3.setConfOptionCode(omsConfSchemeOptionResult.getConfOptionCode());//SimpleFieldAssign//sourceId:938653_1_41643
                    omsConfSchemeOptionResult_3.setConfOptionName(omsConfSchemeOptionResult.getConfOptionName());//SimpleFieldAssign//sourceId:938654_1_41643
                    omsConfSchemeOptionResult_3.setConfItemCode(omsConfSchemeOptionResult.getConfItemCode());//SimpleFieldAssign//sourceId:938655_1_41643
                    omsConfSchemeOptionResult_3.setShortName(omsConfSchemeOptionResult.getShortName());//SimpleFieldAssign//sourceId:938656_1_41643
                    omsConfSchemeOptionResult_3.setConfItemClassCode(omsConfSchemeOptionResult.getConfItemClassCode());//SimpleFieldAssign//sourceId:938657_1_41643
                    omsConfSchemeOptionResult_3.setConfItemClassName(omsConfSchemeOptionResult.getConfItemClassName());//SimpleFieldAssign//sourceId:938658_1_41643
                    omsConfSchemeOptionResult_3.setConfSchemeId(omsConfSchemeOptionResult.getConfSchemeId());//SimpleFieldAssign//sourceId:938659_1_41643
                    omsConfSchemeOptionResult_3.setConfSchemeCode(omsConfSchemeOptionResult.getConfSchemeCode());//SimpleFieldAssign//sourceId:938660_1_41643
                    omsConfSchemeOptionResult_3.setConfSchemeName(omsConfSchemeOptionResult.getConfSchemeName());//SimpleFieldAssign//sourceId:938661_1_41643
                    omsConfSchemeOptionResult_3.setCreateInductionId(omsConfSchemeOptionResult.getCreateInductionId());//SimpleFieldAssign//sourceId:938664_1_41643
                    omsConfSchemeOptionResult_3.setReleaseInductionId(omsConfSchemeOptionResult.getReleaseInductionId());//SimpleFieldAssign//sourceId:938665_1_41643
                    omsConfSchemeOptionResult_3.setCreateTime(omsConfSchemeOptionResult.getCreateTime());//SimpleFieldAssign//sourceId:938666_1_41643
                    omsConfSchemeOptionResult_3.setReleaseTime(omsConfSchemeOptionResult.getReleaseTime());//SimpleFieldAssign//sourceId:938667_1_41643
                    omsConfSchemeOptionResult_3.setSpaceId(omsConfSchemeOptionResult.getSpaceId());//SimpleFieldAssign//sourceId:938668_1_41643
                }
                if (reqDto != null) {
                    omsConfSchemeOptionResult_3.setResultAspObjId(reqDto.getApplexId());//SimpleFieldAssign//sourceId:938643_1_41643
                }

                /*2-3-07新增克隆答案（用于存档）[6656]   */
                Assert.isNull(omsConfSchemeOptionResult_3.getEndValue(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-答案值不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getApplexRelId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-使用关系ID不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getSchOpenRecordId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-方案开通记录ID不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getResultAspObjType(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-开通对象类型编码不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getResultAspObjId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-开通对象ID不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getAuthorizationKeyTypeCode(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-开通钥匙类型标识不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getIsPlatData(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-是否标准答案不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getIsCeResult(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-是否定制结果不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getIsInitialScheme(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-是否初始方案答案不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getOptionType(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-选项答案类型不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getIsSingleResult(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-是否单一答案不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfOptionSortNum(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-答案排序不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfOptionRshipId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-选项关系ID 不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getClassConfItemId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-配置项关系ID不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfOptionCode(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-选项标识不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfOptionName(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-选项名称不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfItemCode(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-配置项标识不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getShortName(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-配置项简称不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfItemClassCode(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-分组标识不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfItemClassName(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-分组名称不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfSchemeId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-配置方案ID 不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfSchemeCode(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-配置方案标识不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getConfSchemeName(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-配置方案名称不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getSubjectLifeCycle(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-主体生命周期不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getIsArchive(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-是否存档不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getCreateInductionId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-创建人就职记录ID不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getReleaseInductionId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-发布人就职记录ID不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getCreateTime(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-创建时间不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getReleaseTime(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-发布时间不能为空", false);
                Assert.isNull(omsConfSchemeOptionResult_3.getSpaceId(), "D2执行回写单条定制答案(公共)-2-3-07新增克隆答案（用于存档）-创建于空间ID不能为空", false);
                string = mOmsConfSchemeOptionResultService.addCloneResult(omsConfSchemeOptionResult_3)/*vcase invoke 本地 method 方法调用;*/;


            }
        }
        ImplementWriteBackSingleCustomResultComRespDto retData = new ImplementWriteBackSingleCustomResultComRespDto();


        return retData;
    }

    /**
     * D2-3查询方案开通记录列表(公共)[3165]
     * gen by moon at 5/15/2023, 10:08:51 PM
     */
    @Trace(operationName = "D2-3查询方案开通记录列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QuerySchemeOpenRecordListComRespDto querySchemeOpenRecordListCom(QuerySchemeOpenRecordListComReqDto reqDto) {


        List<OmsSchemeOpenRecord> listOmsSchemeOpenRecord_1 = new ArrayList<>();
//步骤0: 2-3-12查询方案开通记录列表 - querySchemeOpenRecordList
        List<OmsSchemeOpenRecord> listOmsSchemeOpenRecord = new ArrayList<>();
        QuerySchemeOpenRecordListReq querySchemeOpenRecordListReq = new QuerySchemeOpenRecordListReq();
        querySchemeOpenRecordListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:941388_1
        if (reqDto != null) {
            querySchemeOpenRecordListReq.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:941387_1
        }

        /*2-3-12查询方案开通记录列表[1955]   */
        Assert.isNull(querySchemeOpenRecordListReq.getTenantSpaceId(), "D2-3查询方案开通记录列表(公共)-2-3-12查询方案开通记录列表-租户空间ID不能为空", false);
        Assert.isNull(querySchemeOpenRecordListReq.getSubjectLifeCycle(), "D2-3查询方案开通记录列表(公共)-2-3-12查询方案开通记录列表-主体生命周期不能为空", false);
        listOmsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordList(querySchemeOpenRecordListReq)/*vcase invoke 本地 method 方法调用;*/;


        listOmsSchemeOpenRecord_1 = listOmsSchemeOpenRecord;

        QuerySchemeOpenRecordListComRespDto retData = new QuerySchemeOpenRecordListComRespDto();
        retData.setSchemeOpenRecordList(listOmsSchemeOpenRecord_1.stream().map(item -> BeanUtil.toBean(item, SchemeOpenRecordDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:942581_1


        return retData;
    }

    /**
     * D2批量升级标准克隆答案[2142]
     * gen by moon at 6/6/2023, 6:09:07 AM
     */
    @Trace(operationName = "D2批量升级标准克隆答案")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public BatchUpdateUpgradeCriterionCloneResultRespDto batchUpdateUpgradeCriterionCloneResult(BatchUpdateUpgradeCriterionCloneResultReqDto reqDto) {


        //步骤0: 2-3-13查询应用实例配置关系详情 - queryApplexConrelDetail
        OmsConfApplexRel omsConfApplexRel = null;
        QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
        queryApplexConrelDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:461816_1
        if (reqDto != null) {
            queryApplexConrelDetailReq.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:461826_1
        }

        /*2-3-13查使用关系[2122]   */
        Assert.isNull(queryApplexConrelDetailReq.getApplexRelId(), "D2批量升级标准克隆答案-2-3-13查使用关系-开通对象使用关系ID不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getSubjectLifeCycle(), "D2批量升级标准克隆答案-2-3-13查使用关系-主体生命周期不能为空", false);
        omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//步骤1: 2-3-04查询配置方案详情 - queryConfSchemeDetail
        OmsConfScheme omsConfScheme = null;
        if (omsConfApplexRel != null) {
            QueryConfSchemeDetailReq queryConfSchemeDetailReq = new QueryConfSchemeDetailReq();
            queryConfSchemeDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:461829_1
            if (omsConfApplexRel != null) {
                queryConfSchemeDetailReq.setConfSchemeId(omsConfApplexRel.getConfSchemeId());//SimpleFieldAssign//sourceId:461828_1
            }

            /*2-3-04查配置方案[1923]   */
            Assert.isNull(queryConfSchemeDetailReq.getConfSchemeId(), "D2批量升级标准克隆答案-2-3-04查配置方案-配置方案ID 不能为空", false);
            Assert.isNull(queryConfSchemeDetailReq.getSubjectLifeCycle(), "D2批量升级标准克隆答案-2-3-04查配置方案-生命周期状态不能为空", false);
            omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        }

//步骤2: 2-3-07查询方案下选项配置结果列表 - queryConfItemResultList
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        if (omsConfApplexRel != null) {
            QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
            queryConfItemResultListReq.setIsPlatData("FALSE");//sourceId:986594_1
            queryConfItemResultListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:986595_1
            if (reqDto != null) {
                queryConfItemResultListReq.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:314751_1
            }
            if (omsConfApplexRel != null) {
                queryConfItemResultListReq.setResultAspObjType(omsConfApplexRel.getApplexType());//SimpleFieldAssign//sourceId:490047_1
                queryConfItemResultListReq.setResultAspObjId(omsConfApplexRel.getApplexId());//SimpleFieldAssign//sourceId:104180_1
                queryConfItemResultListReq.setConfSchemeId(omsConfApplexRel.getConfSchemeId());//SimpleFieldAssign//sourceId:461830_1
            }

            /*2-3-07查客户原克隆答案列表[1940]   */
            Assert.isNull(queryConfItemResultListReq.getApplexRelId(), "D2批量升级标准克隆答案-2-3-07查客户原克隆答案列表-使用关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getResultAspObjType(), "D2批量升级标准克隆答案-2-3-07查客户原克隆答案列表-开通对象类型编码不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getResultAspObjId(), "D2批量升级标准克隆答案-2-3-07查客户原克隆答案列表-开通对象ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getConfSchemeId(), "D2批量升级标准克隆答案-2-3-07查客户原克隆答案列表-配置方案ID 不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getIsPlatData(), "D2批量升级标准克隆答案-2-3-07查客户原克隆答案列表-是否标准答案不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getSubjectLifeCycle(), "D2批量升级标准克隆答案-2-3-07查客户原克隆答案列表-主体生命周期不能为空", false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq)/*vcase invoke 本地 method 方法调用;*/;
            Assert.isTrue(listOmsConfSchemeOptionResult == null || CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) || listOmsConfSchemeOptionResult == null || CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) || listOmsConfSchemeOptionResult.size() == 0, "找不到数据，系统异常", false);


        }

//步骤3: 2-3-07批量改克隆答案 - batchUpdateCloneResult
        boolean bOOLEAN;
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_2 = new ArrayList<>();
        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
            listOmsConfSchemeOptionResult_2 = listOmsConfSchemeOptionResult.stream().map(item -> {
                OmsConfSchemeOptionResult elm = BeanUtil.toBean(item, OmsConfSchemeOptionResult.class);
                elm.setSubjectLifeCycle("ARCHIVING");
                elm.setIsArchive("TRUE");

                return elm;
            }).collect(Collectors.toList());//objList-to-objLists//sourceId:986202_1
        }

        /*2-3-07批量存档原克隆答案（不包含定制答案）[6655]   */

        bOOLEAN = mOmsConfSchemeOptionResultService.batchUpdateCloneResult(listOmsConfSchemeOptionResult_2)/*vcase invoke 本地 method 方法调用;*/;


//步骤4: 2-3-07查询方案下选项配置结果列表 - queryConfItemResultList
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_3 = new ArrayList<>();
        if (omsConfApplexRel != null) {
            QueryConfItemResultListReq queryConfItemResultListReq_1 = new QueryConfItemResultListReq();
            queryConfItemResultListReq_1.setIsPlatData("TRUE");//sourceId:104195_1
            queryConfItemResultListReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:104191_1
            if (omsConfApplexRel != null) {
                queryConfItemResultListReq_1.setConfSchemeId(omsConfApplexRel.getConfSchemeId());//SimpleFieldAssign//sourceId:461832_1
            }

            /*2-3-07查配置方案标准答案列表[1940]   */
            Assert.isNull(queryConfItemResultListReq_1.getConfSchemeId(), "D2批量升级标准克隆答案-2-3-07查配置方案标准答案列表-配置方案ID 不能为空", false);
            Assert.isNull(queryConfItemResultListReq_1.getIsPlatData(), "D2批量升级标准克隆答案-2-3-07查配置方案标准答案列表-是否标准答案不能为空", false);
            Assert.isNull(queryConfItemResultListReq_1.getSubjectLifeCycle(), "D2批量升级标准克隆答案-2-3-07查配置方案标准答案列表-主体生命周期不能为空", false);
            listOmsConfSchemeOptionResult_3 = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq_1)/*vcase invoke 本地 method 方法调用;*/;
            Assert.isTrue(listOmsConfSchemeOptionResult_3 == null || CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3) || listOmsConfSchemeOptionResult_3 == null || CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3) || listOmsConfSchemeOptionResult_3.size() == 0, "找不到数据，系统异常", false);


        }

//步骤5: 2-3-07批量新增开通方案下选项配置结果 - batchAddOpenConfItemResult
        boolean bOOLEAN_1;
        if (listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3) && listOmsConfSchemeOptionResult_3.size() > 0) {
            List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_5 = new ArrayList<>();
            if (listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3) && listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3)) {
                OmsConfScheme finalOmsConfScheme = omsConfScheme;
                OmsConfApplexRel finalOmsConfApplexRel = omsConfApplexRel;
                listOmsConfSchemeOptionResult_5 = //objList-to-objLists
                        listOmsConfSchemeOptionResult_3.stream().map(item -> {
                            OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                            elm.setEndValue(item.getEndValue());//SimpleFieldAssign//sourceId:34538_2
                            elm.setExtensionField1(item.getExtensionField1());//SimpleFieldAssign//sourceId:61270_2
                            elm.setExtensionField2(item.getExtensionField2());//SimpleFieldAssign//sourceId:61271_2
                            elm.setExtensionField3(item.getExtensionField3());//SimpleFieldAssign//sourceId:61272_2
                            elm.setExtensionField4(item.getExtensionField4());//SimpleFieldAssign//sourceId:199681_2
                            elm.setOptionThrowPlace(item.getOptionThrowPlace());//SimpleFieldAssign//sourceId:89879_2
                            elm.setConfOptionSortNum(item.getConfOptionSortNum());//SimpleFieldAssign//sourceId:61273_2
                            elm.setIsUltrResult("FALSE");//sourceId:209927_2
                            elm.setIsPlatData("FALSE");//sourceId:34875_2
                            elm.setIsCeResult("FALSE");//sourceId:34876_2
                            elm.setIsSingleResult(item.getIsSingleResult());//SimpleFieldAssign//sourceId:58159_2
                            elm.setOptionType(item.getOptionType());//SimpleFieldAssign//sourceId:34541_2
                            elm.setResultType(item.getResultType());//SimpleFieldAssign//sourceId:34542_2
                            elm.setClassConfItemId(item.getClassConfItemId());//SimpleFieldAssign//sourceId:94521_2
                            elm.setConfOptionRshipId(item.getConfOptionRshipId());//SimpleFieldAssign//sourceId:34540_2
                            elm.setConfOptionCode(item.getConfOptionCode());//SimpleFieldAssign//sourceId:39991_2
                            elm.setConfOptionName(item.getConfOptionName());//SimpleFieldAssign//sourceId:44507_2
                            elm.setConfItemCode(item.getConfItemCode());//SimpleFieldAssign//sourceId:34539_2
                            elm.setShortName(item.getShortName());//SimpleFieldAssign//sourceId:44528_2
                            elm.setConfItemClassCode(item.getConfItemClassCode());//SimpleFieldAssign//sourceId:50849_2
                            elm.setConfItemClassName(item.getConfItemClassName());//SimpleFieldAssign//sourceId:57023_2
                            elm.setConfSchemeId(item.getConfSchemeId());//SimpleFieldAssign//sourceId:34879_2
                            elm.setConfSchemeCode(item.getConfSchemeCode());//SimpleFieldAssign//sourceId:34880_2
                            elm.setConfSchemeName(item.getConfSchemeName());//SimpleFieldAssign//sourceId:57024_2
                            elm.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:34881_2
                            if (finalOmsConfScheme != null) {
                                elm.setIsInitialScheme(finalOmsConfScheme.getIsInitialScheme());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:57089_2
                            }
                            if (finalOmsConfApplexRel != null) {
                                elm.setSchOpenRecordId(finalOmsConfApplexRel.getSchOpenRecordId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:94986_2
                                elm.setResultAspObjId(finalOmsConfApplexRel.getApplexId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:34878_2
                                elm.setAuthorizationKeyTypeCode(finalOmsConfApplexRel.getAuthorizationKeyTypeCode());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:199682_2
                                elm.setResultAspObjType(finalOmsConfApplexRel.getApplexType());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:34877_2
                            }
                            if (reqDto != null) {
                                elm.setApplexRelId(reqDto.getApplexRelId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:94987_2
                            }
                            return elm;
                        }).collect(Collectors.toList());//objList-to-objLists//sourceId:62226_1
            }

            /*2-3-07批量升级克隆标准答案[2129]   */

            bOOLEAN_1 = mOmsConfSchemeOptionResultService.batchAddOpenConfItemResult(listOmsConfSchemeOptionResult_5)/*vcase invoke 本地 method 方法调用;*/;


        }

        BatchUpdateUpgradeCriterionCloneResultRespDto retData = new BatchUpdateUpgradeCriterionCloneResultRespDto();


        return retData;
    }

    /**
     * D2设置定制答案[5407]
     * gen by moon at 6/19/2024, 6:08:52 PM
     */
    @Trace(operationName = "D2设置定制答案")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public SetCustomResultRespDto setCustomResult(SetCustomResultReqDto reqDto) {


        //virtualUsage 2-3-13查使用关系详情  23899
        OmsConfApplexRel omsConfApplexRel = null;
        QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
        queryApplexConrelDetailReq.setIsArchive("FALSE");//sourceId:489839_1_23899
        if (reqDto != null) {
            queryApplexConrelDetailReq.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:489679_1_23899
        }

        /*2-3-13查使用关系详情[2122]   */
        Assert.isNull(queryApplexConrelDetailReq.getApplexRelId(), "D2设置定制答案-2-3-13查使用关系详情-开通对象使用关系ID不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getIsArchive(), "D2设置定制答案-2-3-13查使用关系详情-是否存档不能为空", false);
        omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//virtualUsage 2-3-07查题目原克隆答案  23902
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        if (omsConfApplexRel != null) {
            QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
            queryConfItemResultListReq.setIsPlatData("FALSE");//sourceId:986588_1_23902
            queryConfItemResultListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:986589_1_23902
            if (omsConfApplexRel != null) {
                queryConfItemResultListReq.setResultAspObjId(omsConfApplexRel.getApplexId());//SimpleFieldAssign//sourceId:986264_1_23902
                queryConfItemResultListReq.setSchOpenRecordId(omsConfApplexRel.getSchOpenRecordId());//SimpleFieldAssign//sourceId:986208_1_23902
            }
            if (reqDto != null) {
                queryConfItemResultListReq.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:489852_1_23902
                queryConfItemResultListReq.setClassConfItemId(reqDto.getClassConfItemId());//SimpleFieldAssign//sourceId:489853_1_23902
            }

            /*2-3-07查题目原克隆答案[1940]   */
            Assert.isNull(queryConfItemResultListReq.getResultAspObjId(), "D2设置定制答案-2-3-07查题目原克隆答案-开通对象ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getApplexRelId(), "D2设置定制答案-2-3-07查题目原克隆答案-开通对象使用关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getSchOpenRecordId(), "D2设置定制答案-2-3-07查题目原克隆答案-开通钥匙ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getClassConfItemId(), "D2设置定制答案-2-3-07查题目原克隆答案-配置项关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getIsPlatData(), "D2设置定制答案-2-3-07查题目原克隆答案-是否标准答案不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getSubjectLifeCycle(), "D2设置定制答案-2-3-07查题目原克隆答案-主体生命周期不能为空", false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq)/*vcase invoke 本地 method 方法调用;*/;


        }
        if ((listOmsConfSchemeOptionResult != null && listOmsConfSchemeOptionResult != null && listOmsConfSchemeOptionResult.size() == 0)) {
            //if(2-3-07查题目原克隆答案.配置方案下选项配置结果列表数据集条数 等于 0)  23903

            AddConfItemResultComRespDto addConfItemResultComRespDto = null;
            if (omsConfApplexRel != null) {
                AddConfItemResultComReqDto addConfItemResultComReqDto = new AddConfItemResultComReqDto();
                addConfItemResultComReqDto.setIsCeResult("TRUE");//sourceId:489768_1_70164
                addConfItemResultComReqDto.setIsPlatData("FALSE");//sourceId:489767_1_70164
                addConfItemResultComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:489769_1_70164
                if (reqDto != null && reqDto.getConfItemResultList() != null && !CollectionUtil.isEmpty(reqDto.getConfItemResultList())) {
                    addConfItemResultComReqDto.setConfItemResultList(reqDto.getConfItemResultList().stream().map(item -> BeanUtil.toBean(item, ConfItemResultDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:489770_1_70164
                }
                if (reqDto != null) {
                    addConfItemResultComReqDto.setIsUltrResult(reqDto.getIsUltrResult());//SimpleFieldAssign//sourceId:986212_1_70164
                    addConfItemResultComReqDto.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:1874807_1_70164
                    addConfItemResultComReqDto.setClassConfItemId(reqDto.getClassConfItemId());//SimpleFieldAssign//sourceId:489765_1_70164
                }

                if (omsConfApplexRel != null) {
                    addConfItemResultComReqDto.setResultAspObjId(omsConfApplexRel.getApplexId());//SimpleFieldAssign//sourceId:1874831_1_70164
                    addConfItemResultComReqDto.setSchOpenRecordId(omsConfApplexRel.getSchOpenRecordId());//SimpleFieldAssign//sourceId:1874832_1_70164
                    addConfItemResultComReqDto.setAuthorizationKeyTypeCode(omsConfApplexRel.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:1874833_1_70164
                }

                /*D2-3新增单题答案[4164]   */
                Assert.isNull(addConfItemResultComReqDto.getIsUltrResult(), "D2设置定制答案-D2-3新增单题答案-是否首次答案不能为空", false);
                Assert.isNull(addConfItemResultComReqDto.getApplexRelId(), "D2设置定制答案-D2-3新增单题答案-开通对象使用关系ID不能为空", false);
                Assert.isNull(addConfItemResultComReqDto.getClassConfItemId(), "D2设置定制答案-D2-3新增单题答案-配置项关系ID不能为空", false);
                Assert.isNull(addConfItemResultComReqDto.getResultAspObjId(), "D2设置定制答案-D2-3新增单题答案-开通对象ID不能为空", false);
                Assert.isNull(addConfItemResultComReqDto.getSchOpenRecordId(), "D2设置定制答案-D2-3新增单题答案-开通钥匙ID不能为空", false);
                Assert.isNull(addConfItemResultComReqDto.getAuthorizationKeyTypeCode(), "D2设置定制答案-D2-3新增单题答案-开通钥匙类型标识不能为空", false);
                Assert.isNull(addConfItemResultComReqDto.getIsCeResult(), "D2设置定制答案-D2-3新增单题答案-是否定制结果不能为空", false);
                Assert.isNull(addConfItemResultComReqDto.getIsPlatData(), "D2设置定制答案-D2-3新增单题答案-是否标准答案不能为空", false);
                Assert.isNull(addConfItemResultComReqDto.getSubjectLifeCycle(), "D2设置定制答案-D2-3新增单题答案-主体生命周期不能为空", false);
                addConfItemResultComRespDto = confSchemeService.addConfItemResultCom(addConfItemResultComReqDto)/*vcase invoke isSameApp*/;


            }
        } else if ((listOmsConfSchemeOptionResult != null && listOmsConfSchemeOptionResult != null && listOmsConfSchemeOptionResult.size() > 0)) {
            //elseif(2-3-07查题目原克隆答案.配置方案下选项配置结果列表数据集条数 大于 0)  70165

            if ((reqDto != null && reqDto.getSetCustomResultTypeCode() != null && reqDto.getSetCustomResultTypeCode().equals("SET_CUSTOM_RESULT"))) {
                //if(D2设置定制答案.设置定制答案类型 等于 设置定制答案)  70169

                CalculateContentAmountComRespDto calculateContentAmountComRespDto = null;
                CalculateContentAmountComReqDto calculateContentAmountComReqDto = new CalculateContentAmountComReqDto();
                if (reqDto != null && reqDto.getConfItemResultList() != null && !CollectionUtil.isEmpty(reqDto.getConfItemResultList())) {
                    calculateContentAmountComReqDto.setContentAmountList(reqDto.getConfItemResultList().stream().map(item -> item.getConfOptionRshipId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:1874825_1_70187
                }

                /*D2统计数据集内容条数服务(公共)[3386]   */

                calculateContentAmountComRespDto = statisticalDataService.calculateContentAmountCom(calculateContentAmountComReqDto)/*vcase invoke isSameApp*/;


                CalculateContentAmountComRespDto calculateContentAmountComRespDto_2 = null;
                if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
                    CalculateContentAmountComReqDto calculateContentAmountComReqDto_1 = new CalculateContentAmountComReqDto();
                    if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                        calculateContentAmountComReqDto_1.setContentAmountList(listOmsConfSchemeOptionResult.stream().map(item -> item.getOptionResultId())
                                .collect(Collectors.toList()));/*list-to-strings*///sourceId:1874825_1_70188
                    }

                    /*D2统计数据集内容条数服务(公共)[3386]   */

                    calculateContentAmountComRespDto_2 = statisticalDataService.calculateContentAmountCom(calculateContentAmountComReqDto_1)/*vcase invoke isSameApp*/;


                }
                ImplementNumericalContrastMagnitudeComRespDto implementNumericalContrastMagnitudeComRespDto = null;
                if (calculateContentAmountComRespDto != null && calculateContentAmountComRespDto_2 != null) {
                    ImplementNumericalContrastMagnitudeComReqDto implementNumericalContrastMagnitudeComReqDto = new ImplementNumericalContrastMagnitudeComReqDto();
                    if (calculateContentAmountComRespDto != null) {
                        implementNumericalContrastMagnitudeComReqDto.setCalcPara1(calculateContentAmountComRespDto.getCalcCount() != null ? Double.valueOf(calculateContentAmountComRespDto.getCalcCount()) : null);//SimpleFieldAssign//sourceId:1874822_1_70189
                    }
                    if (calculateContentAmountComRespDto_2 != null) {
                        implementNumericalContrastMagnitudeComReqDto.setCalcPara2(calculateContentAmountComRespDto_2.getCalcCount() != null ? Double.valueOf(calculateContentAmountComRespDto_2.getCalcCount()) : null);//SimpleFieldAssign//sourceId:1874823_1_70189
                    }

                    /*D2执行两个数值对比大小(公共)[5551]   */
                    Assert.isNull(implementNumericalContrastMagnitudeComReqDto.getCalcPara1(), "D2设置定制答案-D2执行两个数值对比大小(公共)-计算入参1不能为空", false);
                    Assert.isNull(implementNumericalContrastMagnitudeComReqDto.getCalcPara2(), "D2设置定制答案-D2执行两个数值对比大小(公共)-计算入参2不能为空", false);
                    implementNumericalContrastMagnitudeComRespDto = interfaceModeService.implementNumericalContrastMagnitudeCom(implementNumericalContrastMagnitudeComReqDto)/*vcase invoke isSameApp*/;


                }
                if ((implementNumericalContrastMagnitudeComRespDto != null && implementNumericalContrastMagnitudeComRespDto.getNumCompareResult() != null && implementNumericalContrastMagnitudeComRespDto.getNumCompareResult().equals("PRESENT") && reqDto != null && reqDto.getConfItemCategory() != null && reqDto.getConfItemCategory().equals("TEXT"))) {
                    //if((D2执行两个数值对比大小(公共).数值比较结果 等于 当前（等于） and D2设置定制答案.选项类型 等于 填空型))  70190

                    boolean bOOLEAN;
                    List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_2 = new ArrayList<>();
                    if (reqDto != null && reqDto.getConfItemResultList() != null && !CollectionUtil.isEmpty(reqDto.getConfItemResultList())) {
                        listOmsConfSchemeOptionResult_2 = reqDto.getConfItemResultList().stream().map(item -> BeanUtil.toBean(item, OmsConfSchemeOptionResult.class)).collect(Collectors.toList());//objList-to-objLists//sourceId:1874795_1_70191
                    }

                    /*2-3-07批量修改开通方案下选项配置结果[2131]   */

                    bOOLEAN = mOmsConfSchemeOptionResultService.batchUpdateOpenConfItemResult(listOmsConfSchemeOptionResult_2)/*vcase invoke 本地 method 方法调用;*/;


                } else if ((implementNumericalContrastMagnitudeComRespDto != null && implementNumericalContrastMagnitudeComRespDto.getNumCompareResult() != null && implementNumericalContrastMagnitudeComRespDto.getNumCompareResult().equals("BEFORE") || implementNumericalContrastMagnitudeComRespDto != null && implementNumericalContrastMagnitudeComRespDto.getNumCompareResult() != null && implementNumericalContrastMagnitudeComRespDto.getNumCompareResult().equals("LATER")) && (reqDto != null && reqDto.getConfItemCategory() != null && reqDto.getConfItemCategory().equals("TEXT"))) {
                    //elseif((D2执行两个数值对比大小(公共).数值比较结果 等于 之前（小于） or D2执行两个数值对比大小(公共).数值比较结果 等于 之后（大于）) and D2设置定制答案.选项类型 等于 填空型)  70192

                    boolean bOOLEAN_1;
                    if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
                        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_3 = new ArrayList<>();
                        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                            listOmsConfSchemeOptionResult_3 = //objList-to-objLists
                                    listOmsConfSchemeOptionResult.stream().map(item -> {
                                        OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                                        elm.setOptionResultId(item.getOptionResultId());//SimpleFieldAssign//sourceId:209897_2_70193
                                        elm.setSubjectLifeCycle("ARCHIVING");//sourceId:209898_2_70193
                                        elm.setIsArchive("TRUE");//sourceId:209899_2_70193
                                        return elm;
                                    }).collect(Collectors.toList());//objList-to-objLists//sourceId:985711_1_70193
                        }

                        /*2-3-07批量存档克隆答案[6655]   */

                        bOOLEAN_1 = mOmsConfSchemeOptionResultService.batchUpdateCloneResult(listOmsConfSchemeOptionResult_3)/*vcase invoke 本地 method 方法调用;*/;


                    }
                    AddConfItemResultComRespDto addConfItemResultComRespDto_1 = null;
                    if (omsConfApplexRel != null) {
                        AddConfItemResultComReqDto addConfItemResultComReqDto_1 = new AddConfItemResultComReqDto();
                        addConfItemResultComReqDto_1.setIsCeResult("TRUE");//sourceId:489768_1_70194
                        addConfItemResultComReqDto_1.setIsPlatData("FALSE");//sourceId:489767_1_70194
                        addConfItemResultComReqDto_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:489769_1_70194
                        if (reqDto != null && reqDto.getConfItemResultList() != null && !CollectionUtil.isEmpty(reqDto.getConfItemResultList())) {
                            addConfItemResultComReqDto_1.setConfItemResultList(reqDto.getConfItemResultList().stream().map(item -> BeanUtil.toBean(item, ConfItemResultDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:489770_1_70194
                        }
                        if (reqDto != null) {
                            addConfItemResultComReqDto_1.setIsUltrResult(reqDto.getIsUltrResult());//SimpleFieldAssign//sourceId:986212_1_70194
                            addConfItemResultComReqDto_1.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:1874807_1_70194
                            addConfItemResultComReqDto_1.setClassConfItemId(reqDto.getClassConfItemId());//SimpleFieldAssign//sourceId:489765_1_70194
                        }
                        if (omsConfApplexRel != null) {
                            addConfItemResultComReqDto_1.setResultAspObjId(omsConfApplexRel.getApplexId());//SimpleFieldAssign//sourceId:1874831_1_70194
                            addConfItemResultComReqDto_1.setSchOpenRecordId(omsConfApplexRel.getSchOpenRecordId());//SimpleFieldAssign//sourceId:1874832_1_70194
                            addConfItemResultComReqDto_1.setAuthorizationKeyTypeCode(omsConfApplexRel.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:1874833_1_70194
                        }

                        /*D2-3新增单题答案[4164]   */
                        Assert.isNull(addConfItemResultComReqDto_1.getIsUltrResult(), "D2设置定制答案-D2-3新增单题答案-是否首次答案不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_1.getApplexRelId(), "D2设置定制答案-D2-3新增单题答案-开通对象使用关系ID不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_1.getClassConfItemId(), "D2设置定制答案-D2-3新增单题答案-配置项关系ID不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_1.getResultAspObjId(), "D2设置定制答案-D2-3新增单题答案-开通对象ID不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_1.getSchOpenRecordId(), "D2设置定制答案-D2-3新增单题答案-开通钥匙ID不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_1.getAuthorizationKeyTypeCode(), "D2设置定制答案-D2-3新增单题答案-开通钥匙类型标识不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_1.getIsCeResult(), "D2设置定制答案-D2-3新增单题答案-是否定制结果不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_1.getIsPlatData(), "D2设置定制答案-D2-3新增单题答案-是否标准答案不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_1.getSubjectLifeCycle(), "D2设置定制答案-D2-3新增单题答案-主体生命周期不能为空", false);
                        addConfItemResultComRespDto_1 = confSchemeService.addConfItemResultCom(addConfItemResultComReqDto_1)/*vcase invoke isSameApp*/;


                    }
                } else if ((reqDto != null && reqDto.getConfItemCategory() != null && reqDto.getConfItemCategory().equals("RADIO") || reqDto != null && reqDto.getConfItemCategory() != null && reqDto.getConfItemCategory().equals("MULTIPLE"))) {
                    //elseif((D2设置定制答案.选项类型 等于 单选型 or D2设置定制答案.选项类型 等于 多选型))  70195

                    boolean bOOLEAN_2;
                    if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
                        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_4 = new ArrayList<>();
                        if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                            listOmsConfSchemeOptionResult_4 = //objList-to-objLists
                                    listOmsConfSchemeOptionResult.stream().map(item -> {
                                        OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                                        elm.setOptionResultId(item.getOptionResultId());//SimpleFieldAssign//sourceId:209897_2_70196
                                        elm.setSubjectLifeCycle("ARCHIVING");//sourceId:209898_2_70196
                                        elm.setIsArchive("TRUE");//sourceId:209899_2_70196
                                        return elm;
                                    }).collect(Collectors.toList());//objList-to-objLists//sourceId:985711_1_70196
                        }

                        /*2-3-07批量存档克隆答案[6655]   */

                        bOOLEAN_2 = mOmsConfSchemeOptionResultService.batchUpdateCloneResult(listOmsConfSchemeOptionResult_4)/*vcase invoke 本地 method 方法调用;*/;


                    }
                    AddConfItemResultComRespDto addConfItemResultComRespDto_2 = null;
                    if (omsConfApplexRel != null) {
                        AddConfItemResultComReqDto addConfItemResultComReqDto_2 = new AddConfItemResultComReqDto();
                        addConfItemResultComReqDto_2.setIsCeResult("TRUE");//sourceId:489768_1_70197
                        addConfItemResultComReqDto_2.setIsPlatData("FALSE");//sourceId:489767_1_70197
                        addConfItemResultComReqDto_2.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:489769_1_70197
                        if (reqDto != null && reqDto.getConfItemResultList() != null && !CollectionUtil.isEmpty(reqDto.getConfItemResultList())) {
                            addConfItemResultComReqDto_2.setConfItemResultList(reqDto.getConfItemResultList().stream().map(item -> BeanUtil.toBean(item, ConfItemResultDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:489770_1_70197
                        }
                        if (reqDto != null) {
                            addConfItemResultComReqDto_2.setIsUltrResult(reqDto.getIsUltrResult());//SimpleFieldAssign//sourceId:986212_1_70197
                            addConfItemResultComReqDto_2.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:1874807_1_70197
                            addConfItemResultComReqDto_2.setClassConfItemId(reqDto.getClassConfItemId());//SimpleFieldAssign//sourceId:489765_1_70197
                        }
                        if (omsConfApplexRel != null) {
                            addConfItemResultComReqDto_2.setResultAspObjId(omsConfApplexRel.getApplexId());//SimpleFieldAssign//sourceId:1874831_1_70197
                            addConfItemResultComReqDto_2.setSchOpenRecordId(omsConfApplexRel.getSchOpenRecordId());//SimpleFieldAssign//sourceId:1874832_1_70197
                            addConfItemResultComReqDto_2.setAuthorizationKeyTypeCode(omsConfApplexRel.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:1874833_1_70197
                        }

                        /*D2-3新增单题答案[4164]   */
                        Assert.isNull(addConfItemResultComReqDto_2.getIsUltrResult(), "D2设置定制答案-D2-3新增单题答案-是否首次答案不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_2.getApplexRelId(), "D2设置定制答案-D2-3新增单题答案-开通对象使用关系ID不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_2.getClassConfItemId(), "D2设置定制答案-D2-3新增单题答案-配置项关系ID不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_2.getResultAspObjId(), "D2设置定制答案-D2-3新增单题答案-开通对象ID不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_2.getSchOpenRecordId(), "D2设置定制答案-D2-3新增单题答案-开通钥匙ID不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_2.getAuthorizationKeyTypeCode(), "D2设置定制答案-D2-3新增单题答案-开通钥匙类型标识不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_2.getIsCeResult(), "D2设置定制答案-D2-3新增单题答案-是否定制结果不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_2.getIsPlatData(), "D2设置定制答案-D2-3新增单题答案-是否标准答案不能为空", false);
                        Assert.isNull(addConfItemResultComReqDto_2.getSubjectLifeCycle(), "D2设置定制答案-D2-3新增单题答案-主体生命周期不能为空", false);
                        addConfItemResultComRespDto_2 = confSchemeService.addConfItemResultCom(addConfItemResultComReqDto_2)/*vcase invoke isSameApp*/;


                    }
                }
            } else if ((reqDto != null && reqDto.getSetCustomResultTypeCode() != null && reqDto.getSetCustomResultTypeCode().equals("UPGRADE_CUSTOM_RESULT"))) {
                //elseif(D2设置定制答案.设置定制答案类型 等于 升级定制答案)  70171

                boolean bOOLEAN_3;
                if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
                    List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_5 = new ArrayList<>();
                    if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                        listOmsConfSchemeOptionResult_5 = //objList-to-objLists
                                listOmsConfSchemeOptionResult.stream().map(item -> {
                                    OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                                    elm.setOptionResultId(item.getOptionResultId());//SimpleFieldAssign//sourceId:209897_2_70172
                                    elm.setSubjectLifeCycle("ARCHIVING");//sourceId:209898_2_70172
                                    elm.setIsArchive("TRUE");//sourceId:209899_2_70172
                                    return elm;
                                }).collect(Collectors.toList());//objList-to-objLists//sourceId:985711_1_70172
                    }

                    /*2-3-07批量存档克隆答案[6655]   */

                    bOOLEAN_3 = mOmsConfSchemeOptionResultService.batchUpdateCloneResult(listOmsConfSchemeOptionResult_5)/*vcase invoke 本地 method 方法调用;*/;


                }
                AddConfItemResultComRespDto addConfItemResultComRespDto_3 = null;
                if (omsConfApplexRel != null) {
                    AddConfItemResultComReqDto addConfItemResultComReqDto_3 = new AddConfItemResultComReqDto();
                    addConfItemResultComReqDto_3.setIsCeResult("TRUE");//sourceId:489768_1_70173
                    addConfItemResultComReqDto_3.setIsPlatData("FALSE");//sourceId:489767_1_70173
                    addConfItemResultComReqDto_3.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:489769_1_70173
                    if (reqDto != null && reqDto.getConfItemResultList() != null && !CollectionUtil.isEmpty(reqDto.getConfItemResultList())) {
                        addConfItemResultComReqDto_3.setConfItemResultList(reqDto.getConfItemResultList().stream().map(item -> BeanUtil.toBean(item, ConfItemResultDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:489770_1_70173
                    }
                    if (reqDto != null) {
                        addConfItemResultComReqDto_3.setIsUltrResult(reqDto.getIsUltrResult());//SimpleFieldAssign//sourceId:986212_1_70173
                        addConfItemResultComReqDto_3.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:1874807_1_70173
                        addConfItemResultComReqDto_3.setClassConfItemId(reqDto.getClassConfItemId());//SimpleFieldAssign//sourceId:489765_1_70173
                    }

                    if (omsConfApplexRel != null) {
                        addConfItemResultComReqDto_3.setResultAspObjId(omsConfApplexRel.getApplexId());//SimpleFieldAssign//sourceId:1874831_1_70173
                        addConfItemResultComReqDto_3.setSchOpenRecordId(omsConfApplexRel.getSchOpenRecordId());//SimpleFieldAssign//sourceId:1874832_1_70173
                        addConfItemResultComReqDto_3.setAuthorizationKeyTypeCode(omsConfApplexRel.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:1874833_1_70173
                    }

                    /*D2-3新增单题答案[4164]   */
                    Assert.isNull(addConfItemResultComReqDto_3.getIsUltrResult(), "D2设置定制答案-D2-3新增单题答案-是否首次答案不能为空", false);
                    Assert.isNull(addConfItemResultComReqDto_3.getApplexRelId(), "D2设置定制答案-D2-3新增单题答案-开通对象使用关系ID不能为空", false);
                    Assert.isNull(addConfItemResultComReqDto_3.getClassConfItemId(), "D2设置定制答案-D2-3新增单题答案-配置项关系ID不能为空", false);
                    Assert.isNull(addConfItemResultComReqDto_3.getResultAspObjId(), "D2设置定制答案-D2-3新增单题答案-开通对象ID不能为空", false);
                    Assert.isNull(addConfItemResultComReqDto_3.getSchOpenRecordId(), "D2设置定制答案-D2-3新增单题答案-开通钥匙ID不能为空", false);
                    Assert.isNull(addConfItemResultComReqDto_3.getAuthorizationKeyTypeCode(), "D2设置定制答案-D2-3新增单题答案-开通钥匙类型标识不能为空", false);
                    Assert.isNull(addConfItemResultComReqDto_3.getIsCeResult(), "D2设置定制答案-D2-3新增单题答案-是否定制结果不能为空", false);
                    Assert.isNull(addConfItemResultComReqDto_3.getIsPlatData(), "D2设置定制答案-D2-3新增单题答案-是否标准答案不能为空", false);
                    Assert.isNull(addConfItemResultComReqDto_3.getSubjectLifeCycle(), "D2设置定制答案-D2-3新增单题答案-主体生命周期不能为空", false);
                    addConfItemResultComRespDto_3 = confSchemeService.addConfItemResultCom(addConfItemResultComReqDto_3)/*vcase invoke isSameApp*/;


                }
            }
        }
//processBranchName:正常结束 ,processBranchId:23906

        SetCustomResultRespDto retData = new SetCustomResultRespDto();


        return retData;
    }

    /**
     * D2执行升级单题标准克隆答案[6969]
     * gen by moon at 6/27/2023, 1:12:09 PM
     */
    @Trace(operationName = "D2执行升级单题标准克隆答案")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementUpgradeSingleCriterionCloneResultRespDto implementUpgradeSingleCriterionCloneResult(ImplementUpgradeSingleCriterionCloneResultReqDto reqDto) {


        //virtualUsage 2-3-13查使用关系详情  43216
        OmsConfApplexRel omsConfApplexRel = null;
        QueryApplexConrelDetailReq queryApplexConrelDetailReq = new QueryApplexConrelDetailReq();
        queryApplexConrelDetailReq.setIsArchive("FALSE");//sourceId:986553_1_43216
        if (reqDto != null) {
            queryApplexConrelDetailReq.setApplexRelId(reqDto.getApplexRelId());//SimpleFieldAssign//sourceId:986552_1_43216
        }

        /*2-3-13查使用关系详情[2122]   */
        Assert.isNull(queryApplexConrelDetailReq.getApplexRelId(), "D2执行升级单题标准克隆答案-2-3-13查使用关系详情-开通对象使用关系ID不能为空", false);
        Assert.isNull(queryApplexConrelDetailReq.getIsArchive(), "D2执行升级单题标准克隆答案-2-3-13查使用关系详情-是否存档不能为空", false);
        omsConfApplexRel = mOmsConfApplexRelService.queryApplexConrelDetail(queryApplexConrelDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//virtualUsage 2-3-07查单题克隆答案列表  43217
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult = new ArrayList<>();
        if (omsConfApplexRel != null) {
            QueryConfItemResultListReq queryConfItemResultListReq = new QueryConfItemResultListReq();
            queryConfItemResultListReq.setIsPlatData("FALSE");//sourceId:986558_1_43217
            queryConfItemResultListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:986599_1_43217
            if (omsConfApplexRel != null) {
                queryConfItemResultListReq.setResultAspObjId(omsConfApplexRel.getApplexId());//SimpleFieldAssign//sourceId:986554_1_43217
                queryConfItemResultListReq.setApplexRelId(omsConfApplexRel.getApplexRelId());//SimpleFieldAssign//sourceId:986555_1_43217
                queryConfItemResultListReq.setSchOpenRecordId(omsConfApplexRel.getSchOpenRecordId());//SimpleFieldAssign//sourceId:986556_1_43217
            }
            if (reqDto != null) {
                queryConfItemResultListReq.setClassConfItemId(reqDto.getClassConfItemId());//SimpleFieldAssign//sourceId:986557_1_43217
                queryConfItemResultListReq.setIsCeResult(reqDto.getIsCeResult());//SimpleFieldAssign//sourceId:986560_1_43217
            }

            /*2-3-07查单题克隆答案列表[1940]   */
            Assert.isNull(queryConfItemResultListReq.getResultAspObjId(), "D2执行升级单题标准克隆答案-2-3-07查单题克隆答案列表-开通对象ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getApplexRelId(), "D2执行升级单题标准克隆答案-2-3-07查单题克隆答案列表-使用关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getSchOpenRecordId(), "D2执行升级单题标准克隆答案-2-3-07查单题克隆答案列表-开通钥匙ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getClassConfItemId(), "D2执行升级单题标准克隆答案-2-3-07查单题克隆答案列表-配置项关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getIsPlatData(), "D2执行升级单题标准克隆答案-2-3-07查单题克隆答案列表-是否标准答案不能为空", false);
            Assert.isNull(queryConfItemResultListReq.getSubjectLifeCycle(), "D2执行升级单题标准克隆答案-2-3-07查单题克隆答案列表-主体生命周期不能为空", false);
            listOmsConfSchemeOptionResult = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq)/*vcase invoke 本地 method 方法调用;*/;


        }
        if ((listOmsConfSchemeOptionResult != null && listOmsConfSchemeOptionResult != null && listOmsConfSchemeOptionResult.size() > 0)) {
            //if(2-3-07查题目原克隆答案（含定制答案）.配置方案下选项配置结果列表数据集条数 大于 0)  43218

            boolean bOOLEAN;
            if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
                List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_2 = new ArrayList<>();
                if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                    listOmsConfSchemeOptionResult_2 = //objList-to-objLists
                            listOmsConfSchemeOptionResult.stream().map(item -> {
                                OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                                elm.setOptionResultId(item.getOptionResultId());//SimpleFieldAssign//sourceId:210029_2_43219
                                elm.setSubjectLifeCycle("ARCHIVING");//sourceId:210030_2_43219
                                elm.setIsArchive("TRUE");//sourceId:210031_2_43219
                                return elm;
                            }).collect(Collectors.toList());//objList-to-objLists//sourceId:986559_1_43219
                }

                /*2-3-07批量存档原克隆答案[6655]   */

                bOOLEAN = mOmsConfSchemeOptionResultService.batchUpdateCloneResult(listOmsConfSchemeOptionResult_2)/*vcase invoke 本地 method 方法调用;*/;


            }
        }
//virtualUsage 2-3-07查单题标准答案列表  43222
        List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_3 = new ArrayList<>();
        if (omsConfApplexRel != null) {
            QueryConfItemResultListReq queryConfItemResultListReq_1 = new QueryConfItemResultListReq();
            queryConfItemResultListReq_1.setIsPlatData("TRUE");//sourceId:986586_1_43222
            queryConfItemResultListReq_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:986587_1_43222
            if (reqDto != null) {
                queryConfItemResultListReq_1.setClassConfItemId(reqDto.getClassConfItemId());//SimpleFieldAssign//sourceId:986583_1_43222
            }
            if (omsConfApplexRel != null) {
                queryConfItemResultListReq_1.setConfSchemeId(omsConfApplexRel.getConfSchemeId());//SimpleFieldAssign//sourceId:986584_1_43222
            }

            /*2-3-07查单题标准答案列表[1940]   */
            Assert.isNull(queryConfItemResultListReq_1.getClassConfItemId(), "D2执行升级单题标准克隆答案-2-3-07查单题标准答案列表-配置项关系ID不能为空", false);
            Assert.isNull(queryConfItemResultListReq_1.getConfSchemeId(), "D2执行升级单题标准克隆答案-2-3-07查单题标准答案列表-配置方案ID 不能为空", false);
            Assert.isNull(queryConfItemResultListReq_1.getIsPlatData(), "D2执行升级单题标准克隆答案-2-3-07查单题标准答案列表-是否标准答案不能为空", false);
            Assert.isNull(queryConfItemResultListReq_1.getSubjectLifeCycle(), "D2执行升级单题标准克隆答案-2-3-07查单题标准答案列表-主体生命周期不能为空", false);
            listOmsConfSchemeOptionResult_3 = mOmsConfSchemeOptionResultService.queryConfItemResultList(queryConfItemResultListReq_1)/*vcase invoke 本地 method 方法调用;*/;


        }
        if ((reqDto != null && reqDto.getIsCeResult() != null && reqDto.getIsCeResult().equals("FALSE"))) {
            //if(D2执行升级单题标准克隆答案.是否定制结果 等于 否)  46543

            ImplementTwoDataRemovalExistsComRespDto implementTwoDataRemovalExistsComRespDto = null;
            if (listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3) && listOmsConfSchemeOptionResult_3.size() > 0 && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult.size() > 0) {
                ImplementTwoDataRemovalExistsComReqDto implementTwoDataRemovalExistsComReqDto = new ImplementTwoDataRemovalExistsComReqDto();
                if (listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3) && listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3)) {
                    implementTwoDataRemovalExistsComReqDto.setDataSetsListOne(//objList-to-objLists
                            listOmsConfSchemeOptionResult_3.stream().map(item -> {
                                DataSetsListOneDto elm = new DataSetsListOneDto();
                                elm.setCustomField(item.getConfOptionCode());//SimpleFieldAssign//sourceId:225103_2_46549
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1067327_1_46549
                }
                if (listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult) && listOmsConfSchemeOptionResult != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult)) {
                    implementTwoDataRemovalExistsComReqDto.setDataSetsListTwo(//objList-to-objLists
                            listOmsConfSchemeOptionResult.stream().map(item -> {
                                DataSetsListTwoDto elm = new DataSetsListTwoDto();
                                elm.setCustomField(item.getConfOptionCode());//SimpleFieldAssign//sourceId:225105_2_46549
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1067328_1_46549
                }

                /*D2-去除标准答案中的定制答案[5347]   */

                implementTwoDataRemovalExistsComRespDto = interfaceModeService.implementTwoDataRemovalExistsCom(implementTwoDataRemovalExistsComReqDto)/*vcase invoke isSameApp*/;


            }
            List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_5 = new ArrayList<>();
            if (implementTwoDataRemovalExistsComRespDto != null && omsConfApplexRel != null) {
                BatchQueryOptionMatchAnswerListByIdsReq batchQueryOptionMatchAnswerListByIdsReq = new BatchQueryOptionMatchAnswerListByIdsReq();
                batchQueryOptionMatchAnswerListByIdsReq.setIsPlatData("TRUE");//sourceId:1067321_1_46545
                batchQueryOptionMatchAnswerListByIdsReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1067324_1_46545
                if (implementTwoDataRemovalExistsComRespDto != null && implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList() != null && !CollectionUtil.isEmpty(implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList())) {
                    batchQueryOptionMatchAnswerListByIdsReq.setConfItemResultList(implementTwoDataRemovalExistsComRespDto.getTwoDataRemovalExistsList().stream().map(item -> item.getCustomField())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:1067325_1_46545
                }
                if (reqDto != null) {
                    batchQueryOptionMatchAnswerListByIdsReq.setClassConfItemId(reqDto.getClassConfItemId());//SimpleFieldAssign//sourceId:1067540_1_46545
                }
                if (omsConfApplexRel != null) {
                    batchQueryOptionMatchAnswerListByIdsReq.setConfSchemeId(omsConfApplexRel.getConfSchemeId());//SimpleFieldAssign//sourceId:1067323_1_46545
                }

                /*2-3-07批量查询配置选项匹配答案列表[7265]   */
                Assert.isNull(batchQueryOptionMatchAnswerListByIdsReq.getClassConfItemId(), "D2执行升级单题标准克隆答案-2-3-07批量查询配置选项匹配答案列表-配置项关系ID不能为空", false);
                Assert.isNull(batchQueryOptionMatchAnswerListByIdsReq.getConfSchemeId(), "D2执行升级单题标准克隆答案-2-3-07批量查询配置选项匹配答案列表-配置方案ID 不能为空", false);
                Assert.isNull(batchQueryOptionMatchAnswerListByIdsReq.getIsPlatData(), "D2执行升级单题标准克隆答案-2-3-07批量查询配置选项匹配答案列表-是否标准答案不能为空", false);
                Assert.isNull(batchQueryOptionMatchAnswerListByIdsReq.getSubjectLifeCycle(), "D2执行升级单题标准克隆答案-2-3-07批量查询配置选项匹配答案列表-主体生命周期不能为空", false);
                listOmsConfSchemeOptionResult_5 = mOmsConfSchemeOptionResultService.batchQueryOptionMatchAnswerListByIds(batchQueryOptionMatchAnswerListByIdsReq)/*vcase invoke 本地 method 方法调用;*/;


            }
            boolean bOOLEAN_1;
            if (listOmsConfSchemeOptionResult_5 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_5) && listOmsConfSchemeOptionResult_5.size() > 0 && omsConfApplexRel != null) {
                List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_7 = new ArrayList<>();
                if (listOmsConfSchemeOptionResult_5 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_5) && listOmsConfSchemeOptionResult_5 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_5)) {
                    OmsConfApplexRel finalOmsConfApplexRel = omsConfApplexRel;
                    listOmsConfSchemeOptionResult_7 = //objList-to-objLists
                            listOmsConfSchemeOptionResult_5.stream().map(item -> {
                                OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                                elm.setEndValue(item.getEndValue());//SimpleFieldAssign//sourceId:210066_2_46546
                                elm.setExtensionField1(item.getExtensionField1());//SimpleFieldAssign//sourceId:210085_2_46546
                                elm.setExtensionField2(item.getExtensionField2());//SimpleFieldAssign//sourceId:210086_2_46546
                                elm.setExtensionField3(item.getExtensionField3());//SimpleFieldAssign//sourceId:210087_2_46546
                                elm.setExtensionField4(item.getExtensionField4());//SimpleFieldAssign//sourceId:210094_2_46546
                                elm.setOptionThrowPlace(item.getOptionThrowPlace());//SimpleFieldAssign//sourceId:210089_2_46546
                                elm.setConfOptionSortNum(item.getConfOptionSortNum());//SimpleFieldAssign//sourceId:210088_2_46546
                                elm.setResultType(item.getResultType());//SimpleFieldAssign//sourceId:210065_2_46546
                                elm.setOptionType(item.getOptionType());//SimpleFieldAssign//sourceId:210067_2_46546
                                elm.setIsSingleResult(item.getIsSingleResult());//SimpleFieldAssign//sourceId:210084_2_46546
                                elm.setIsInitialScheme(item.getIsInitialScheme());//SimpleFieldAssign//sourceId:210083_2_46546
                                elm.setIsCeResult("FALSE");//sourceId:210071_2_46546
                                elm.setIsPlatData("FALSE");//sourceId:210070_2_46546
                                elm.setConfOptionRshipId(item.getConfOptionRshipId());//SimpleFieldAssign//sourceId:210069_2_46546
                                elm.setConfOptionCode(item.getConfOptionCode());//SimpleFieldAssign//sourceId:210077_2_46546
                                elm.setConfOptionName(item.getConfOptionName());//SimpleFieldAssign//sourceId:210078_2_46546
                                elm.setConfItemCode(item.getConfItemCode());//SimpleFieldAssign//sourceId:210068_2_46546
                                elm.setShortName(item.getShortName());//SimpleFieldAssign//sourceId:210079_2_46546
                                elm.setClassConfItemId(item.getClassConfItemId());//SimpleFieldAssign//sourceId:210090_2_46546
                                elm.setConfItemClassCode(item.getConfItemClassCode());//SimpleFieldAssign//sourceId:210080_2_46546
                                elm.setConfItemClassName(item.getConfItemClassName());//SimpleFieldAssign//sourceId:210081_2_46546
                                elm.setConfSchemeId(item.getConfSchemeId());//SimpleFieldAssign//sourceId:210074_2_46546
                                elm.setConfSchemeCode(item.getConfSchemeCode());//SimpleFieldAssign//sourceId:210075_2_46546
                                elm.setConfSchemeName(item.getConfSchemeName());//SimpleFieldAssign//sourceId:210082_2_46546
                                elm.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:210076_2_46546
                                if (reqDto != null) {
                                    elm.setIsUltrResult(reqDto.getIsUltrResult());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210095_2_46546
                                }
                                if (finalOmsConfApplexRel != null) {
                                    elm.setApplexRelId(finalOmsConfApplexRel.getApplexRelId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210092_2_46546
                                    elm.setSchOpenRecordId(finalOmsConfApplexRel.getSchOpenRecordId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210091_2_46546
                                    elm.setResultAspObjId(finalOmsConfApplexRel.getApplexId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210073_2_46546
                                    elm.setAuthorizationKeyTypeCode(finalOmsConfApplexRel.getAuthorizationKeyTypeCode());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210093_2_46546
                                    elm.setResultAspObjType(finalOmsConfApplexRel.getApplexType());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210072_2_46546
                                }
                                return elm;
                            }).collect(Collectors.toList());//objList-to-objLists//sourceId:986582_1_46546
                }

                /*2-3-07批量克隆标准答案[2031]   */

                bOOLEAN_1 = mOmsConfSchemeOptionResultService.batchAddConfItemResult(listOmsConfSchemeOptionResult_7)/*vcase invoke 本地 method 方法调用;*/;


            }
        } else if ((reqDto != null && reqDto.getIsCeResult() == null)) {
            //elseif(D2执行升级单题标准克隆答案.是否定制结果 值等于空 )  46547

            boolean bOOLEAN_2;
            if (listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3) && listOmsConfSchemeOptionResult_3.size() > 0 && omsConfApplexRel != null) {
                List<OmsConfSchemeOptionResult> listOmsConfSchemeOptionResult_8 = new ArrayList<>();
                if (listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3) && listOmsConfSchemeOptionResult_3 != null && !CollectionUtil.isEmpty(listOmsConfSchemeOptionResult_3)) {
                    OmsConfApplexRel finalOmsConfApplexRel1 = omsConfApplexRel;
                    listOmsConfSchemeOptionResult_8 = //objList-to-objLists
                            listOmsConfSchemeOptionResult_3.stream().map(item -> {
                                OmsConfSchemeOptionResult elm = new OmsConfSchemeOptionResult();
                                elm.setEndValue(item.getEndValue());//SimpleFieldAssign//sourceId:210066_2_46548
                                elm.setExtensionField1(item.getExtensionField1());//SimpleFieldAssign//sourceId:210085_2_46548
                                elm.setExtensionField2(item.getExtensionField2());//SimpleFieldAssign//sourceId:210086_2_46548
                                elm.setExtensionField3(item.getExtensionField3());//SimpleFieldAssign//sourceId:210087_2_46548
                                elm.setExtensionField4(item.getExtensionField4());//SimpleFieldAssign//sourceId:210094_2_46548
                                elm.setOptionThrowPlace(item.getOptionThrowPlace());//SimpleFieldAssign//sourceId:210089_2_46548
                                elm.setConfOptionSortNum(item.getConfOptionSortNum());//SimpleFieldAssign//sourceId:210088_2_46548
                                elm.setResultType(item.getResultType());//SimpleFieldAssign//sourceId:210065_2_46548
                                elm.setOptionType(item.getOptionType());//SimpleFieldAssign//sourceId:210067_2_46548
                                elm.setIsSingleResult(item.getIsSingleResult());//SimpleFieldAssign//sourceId:210084_2_46548
                                elm.setIsInitialScheme(item.getIsInitialScheme());//SimpleFieldAssign//sourceId:210083_2_46548
                                elm.setIsCeResult("FALSE");//sourceId:210071_2_46548
                                elm.setIsPlatData("FALSE");//sourceId:210070_2_46548
                                elm.setConfOptionRshipId(item.getConfOptionRshipId());//SimpleFieldAssign//sourceId:210069_2_46548
                                elm.setConfOptionCode(item.getConfOptionCode());//SimpleFieldAssign//sourceId:210077_2_46548
                                elm.setConfOptionName(item.getConfOptionName());//SimpleFieldAssign//sourceId:210078_2_46548
                                elm.setConfItemCode(item.getConfItemCode());//SimpleFieldAssign//sourceId:210068_2_46548
                                elm.setShortName(item.getShortName());//SimpleFieldAssign//sourceId:210079_2_46548
                                elm.setClassConfItemId(item.getClassConfItemId());//SimpleFieldAssign//sourceId:210090_2_46548
                                elm.setConfItemClassCode(item.getConfItemClassCode());//SimpleFieldAssign//sourceId:210080_2_46548
                                elm.setConfItemClassName(item.getConfItemClassName());//SimpleFieldAssign//sourceId:210081_2_46548
                                elm.setConfSchemeId(item.getConfSchemeId());//SimpleFieldAssign//sourceId:210074_2_46548
                                elm.setConfSchemeCode(item.getConfSchemeCode());//SimpleFieldAssign//sourceId:210075_2_46548
                                elm.setConfSchemeName(item.getConfSchemeName());//SimpleFieldAssign//sourceId:210082_2_46548
                                elm.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:210076_2_46548
                                if (reqDto != null) {
                                    elm.setIsUltrResult(reqDto.getIsUltrResult());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210095_2_46548
                                }
                                if (finalOmsConfApplexRel1 != null) {
                                    elm.setApplexRelId(finalOmsConfApplexRel1.getApplexRelId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210092_2_46548
                                    elm.setSchOpenRecordId(finalOmsConfApplexRel1.getSchOpenRecordId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210091_2_46548
                                    elm.setResultAspObjId(finalOmsConfApplexRel1.getApplexId());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210073_2_46548
                                    elm.setAuthorizationKeyTypeCode(finalOmsConfApplexRel1.getAuthorizationKeyTypeCode());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210093_2_46548
                                    elm.setResultAspObjType(finalOmsConfApplexRel1.getApplexType());//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:210072_2_46548
                                }
                                return elm;
                            }).collect(Collectors.toList());//objList-to-objLists//sourceId:986582_1_46548
                }

                /*2-3-07批量克隆标准答案[2031]   */

                bOOLEAN_2 = mOmsConfSchemeOptionResultService.batchAddConfItemResult(listOmsConfSchemeOptionResult_8)/*vcase invoke 本地 method 方法调用;*/;


            }
        }
        ImplementUpgradeSingleCriterionCloneResultRespDto retData = new ImplementUpgradeSingleCriterionCloneResultRespDto();


        return retData;
    }
///**
//   * D2查询方案授权对象列表(公共)[5716]
//   * gen by moon at 1/16/2023, 5:56:20 PM
//   */
//  @Trace(operationName = "D2查询方案授权对象列表(公共)")
//  @Tags({@Tag(key = "参数",value = "arg[0]"),
//            @Tag(key = "返回值",value = "returnedObj")})
//  @Transactional(rollbackFor=Exception.class)
//  @Override
//  public QuerySchemeAuthObjListComRespDto querySchemeAuthObjListCom(QuerySchemeAuthObjListComReqDto reqDto){
//
//
//      //virtualUsage 2-3-04查询配置方案详情  27389
//      OmsConfScheme omsConfScheme = null;
//    QueryConfSchemeDetailReq queryConfSchemeDetailReq=new QueryConfSchemeDetailReq();
//  if(reqDto!=null){
//      queryConfSchemeDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613228_1_27389
//    }
//
//    /*2-3-04查询配置方案详情[1923]   */
//    Assert.isNull(queryConfSchemeDetailReq.getConfSchemeId(),"D2查询方案授权对象列表(公共)-2-3-04查询配置方案详情-配置方案ID 不能为空",false);
//      omsConfScheme = mOmsConfSchemeService.queryConfSchemeDetail(queryConfSchemeDetailReq);
//
//
//
//if((reqDto!= null&&  reqDto.getApplexType() !=null && reqDto.getApplexType().equals("EVA_THEME"))) {
//        //if(D2查询方案授权对象列表(公共).应用实例类型 等于 评价主题)  27382
//
//QueryEvaThemeListComRespDto queryEvaThemeListComRespDto = null;
//    if(omsConfScheme !=null){
//          Object queryEvaThemeListComReqDto=new Object();
//  if(omsConfScheme!=null){
//      queryEvaThemeListComReqDto=omsConfScheme.getConfSchemeCode();;//SimpleFieldAssign//sourceId:613116_1_27383
//    }
//if(reqDto!=null){
//      queryEvaThemeListComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:613117_1_27383
//    }
//
//    /*D3查询评价主题列表(公共)[5717]   */
//    Assert.isNull(queryEvaThemeListComReqDto,"D2查询方案授权对象列表(公共)-D3查询评价主题列表(公共)-冗余配置方案标识不能为空",false);
//Assert.isNull(queryEvaThemeListComReqDto,"D2查询方案授权对象列表(公共)-D3查询评价主题列表(公共)-主体生命周期不能为空",false);
//      queryEvaThemeListComRespDto = appEvaThemeService.queryEvaThemeListCom(queryEvaThemeListComReqDto);
//
//
//
//           }
//      }
//else if((reqDto!= null&&  reqDto.getApplexType() !=null && reqDto.getApplexType().equals("EVA_TEMP"))){
//       //elseif(D2查询方案授权对象列表(公共).应用实例类型 等于 评价模板)  27384
//
//QueryEvaluationTemplateListComRespDto queryEvaluationTemplateListComRespDto = null;
//    if(omsConfScheme !=null){
//          Object queryEvaluationTemplateListComReqDto=new Object();
//  if(omsConfScheme!=null){
//      queryEvaluationTemplateListComReqDto=omsConfScheme.getConfSchemeCode();;//SimpleFieldAssign//sourceId:613096_1_27385
//    }
//if(reqDto!=null){
//      queryEvaluationTemplateListComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:613097_1_27385
//    }
//
//    /*D3-查询评价模板列表(公共)[5466]   */
//    Assert.isNull(queryEvaluationTemplateListComReqDto,"D2查询方案授权对象列表(公共)-D3-查询评价模板列表(公共)-冗余配置方案标识不能为空",false);
//Assert.isNull(queryEvaluationTemplateListComReqDto,"D2查询方案授权对象列表(公共)-D3-查询评价模板列表(公共)-主体生命周期不能为空",false);
//      queryEvaluationTemplateListComRespDto = appEvaSystemService.queryEvaluationTemplateListCom(queryEvaluationTemplateListComReqDto);
//
//
//
//           }
//    }
//else if((reqDto!= null&&  reqDto.getApplexType() !=null && reqDto.getApplexType().equals("ORG"))){
//       //elseif(D2查询方案授权对象列表(公共).应用实例类型 等于 组织)  27386
//
//QueryOrgListComRespDto queryOrgListComRespDto = null;
//    Object queryOrgListComReqDto=new Object();
//  if(reqDto!=null){
//      queryOrgListComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:613124_1_27387
//    }
//
//    /*D1查询组织列表(公共)[5718]   */
//    Assert.isNull(queryOrgListComReqDto.getSubjectLifeCycle(),"D2查询方案授权对象列表(公共)-D1查询组织列表(公共)-主体生命周期不能为空",false);
//      queryOrgListComRespDto = baseOrgService.queryOrgListCom(queryOrgListComReqDto);
//
//
//
//    }
//QuerySchemeAuthObjListComRespDto retData = new QuerySchemeAuthObjListComRespDto();
//  //todo dong 未找到匹配生成策略,请检查生成策略retData.setCommPrimaryKeyList(),数据源项; to( ==>tableName:undefined, fieldEnname:commPrimaryKeyList ,uniqueId: 613196_1 uniqueSourceId:out_null_null) from (varName:undefined fieldundefined)
//
//
//
//
//return retData;
//  }
///**
//   * D2执行开通方案有效性鉴权(公共)[5714]
//   * gen by moon at 1/16/2023, 5:56:26 PM
//   */
//  @Trace(operationName = "D2执行开通方案有效性鉴权(公共)")
//  @Tags({@Tag(key = "参数",value = "arg[0]"),
//            @Tag(key = "返回值",value = "returnedObj")})
//  @Transactional(rollbackFor=Exception.class)
//  @Override
//  public ImplementSchemeOpenRecordValidityAuthenticationComRespDto implementSchemeOpenRecordValidityAuthenticationCom(ImplementSchemeOpenRecordValidityAuthenticationComReqDto reqDto){
//
//
//      if((reqDto!= null&&  reqDto.getAuthType() !=null && reqDto.getAuthType().equals("CYCLE_TIME")||reqDto!= null&&  reqDto.getAuthType() !=null && reqDto.getAuthType().equals("FIXED_TIME"))) {
//        //if((D2执行开通方案有效性鉴权(公共).授权类型 等于 周期时间型 or D2执行开通方案有效性鉴权(公共).授权类型 等于 固定时间型))  27367
//
//QuerySchemeAuthObjListComRespDto querySchemeAuthObjListComRespDto = null;
//    QuerySchemeAuthObjListComReqDto querySchemeAuthObjListComReqDto=new QuerySchemeAuthObjListComReqDto();
//  querySchemeAuthObjListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:613200_1_27381
//if(reqDto!=null){
//      querySchemeAuthObjListComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613254_1_27381
//querySchemeAuthObjListComReqDto.setApplexType(reqDto.getApplexType());//SimpleFieldAssign//sourceId:613198_1_27381
//    }
//
//    /*D2查询方案授权对象列表(公共)[5716]   */
//    Assert.isNull(querySchemeAuthObjListComReqDto.getConfSchemeId(),"D2执行开通方案有效性鉴权(公共)-D2查询方案授权对象列表(公共)-配置方案ID 不能为空",false);
//Assert.isNull(querySchemeAuthObjListComReqDto.getApplexType(),"D2执行开通方案有效性鉴权(公共)-D2查询方案授权对象列表(公共)-应用实例类型不能为空",false);
//Assert.isNull(querySchemeAuthObjListComReqDto.getSubjectLifeCycle(),"D2执行开通方案有效性鉴权(公共)-D2查询方案授权对象列表(公共)-主体生命周期不能为空",false);
//      querySchemeAuthObjListComRespDto = querySchemeAuthObjListCom(querySchemeAuthObjListComReqDto);
//
//
//
//if((querySchemeAuthObjListComRespDto!= null&&  querySchemeAuthObjListComRespDto.getCommPrimaryKeyList() !=null && querySchemeAuthObjListComRespDto.getCommPrimaryKeyList().size()>0)) {
//        //if(D2查询方案授权对象列表(公共).通用主键列表数据集条数 大于 0)  27390
//
//ImplementCountNumberDataSetsComRespDto implementCountNumberDataSetsComRespDto = null;
//    if(querySchemeAuthObjListComRespDto !=null){
//          ImplementCountNumberDataSetsComReqDto implementCountNumberDataSetsComReqDto=new ImplementCountNumberDataSetsComReqDto();
//  //todo dong 未找到匹配生成策略,请检查生成策略implementCountNumberDataSetsComReqDto.setCountNumberDataSetsList(querySchemeAuthObjListComRespDto.getCommPrimaryKeyList()),数据源项; to( ==>tableName:undefined, fieldEnname:countNumberDataSetsList ,uniqueId: 613201_1_27391 uniqueSourceId:613197_1_27381) from (varName:undefined fieldquerySchemeAuthObjListComRespDto.getCommPrimaryKeyList())
//
//    /*D2-执行统计数据集条数服务(公共)[5166]   */
//
//      implementCountNumberDataSetsComRespDto = interfaceModeService.implementCountNumberDataSetsCom(implementCountNumberDataSetsComReqDto);
//
//
//
//           }
//CalculateCalcServiceCollectionComRespDto calculateCalcServiceCollectionComRespDto = null;
//    if(implementCountNumberDataSetsComRespDto !=null){
//          Object calculateCalcServiceCollectionComReqDto=new Object();
//  calculateCalcServiceCollectionComReqDto.setCalcFormula("SUBTRACTION_OF_TWO_NUM");//sourceId:613256_1_27392
//if(reqDto!=null){
//      calculateCalcServiceCollectionComReqDto.setCalcPara1(reqDto.getAuthorizationNum()!=null?Double.valueOf(reqDto.getAuthorizationNum()):null);//SimpleFieldAssign//sourceId:613258_1_27392
//    }
//if(implementCountNumberDataSetsComRespDto!=null){
//      calculateCalcServiceCollectionComReqDto.setCalcPara2(implementCountNumberDataSetsComRespDto.getOutputNum()!=null?Double.valueOf(implementCountNumberDataSetsComRespDto.getOutputNum()):null);//SimpleFieldAssign//sourceId:613259_1_27392
//    }
//
//    /*D4-计算服务集合(公共)[5091]   */
//    Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcFormula(),"D2执行开通方案有效性鉴权(公共)-D4-计算服务集合(公共)-通用计算公式不能为空",false);
//Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara1(),"D2执行开通方案有效性鉴权(公共)-D4-计算服务集合(公共)-计算入参1不能为空",false);
//Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara2(),"D2执行开通方案有效性鉴权(公共)-D4-计算服务集合(公共)-计算入参2不能为空",false);
//      calculateCalcServiceCollectionComRespDto = calcCalculationRulesService.calculateCalcServiceCollectionCom(calculateCalcServiceCollectionComReqDto);
//
//
//
//           }
//if((calculateCalcServiceCollectionComRespDto!= null&& calculateCalcServiceCollectionComRespDto.getCalcResult() > 0)) {
//        //if(D4-计算服务集合(公共).计算结果 大于 0)  27393
//
////ModelCode: receptionService
//        ObtainReceiveFieldsRespDto receptionServiceRes = null;
//    ObtainReceiveFieldsReqDto receptionServiceReq=new ObtainReceiveFieldsReqDto();
//  receptionServiceReq.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:612832_1_27394
//
//    /*M2-约定允许操作[4007]  用于特殊方法接收上游入参。 */
//    Assert.isNull(receptionServiceReq.getOutputNum(),"D2执行开通方案有效性鉴权(公共)-M2-约定允许操作-传输数值（整数型）不能为空",false);
//      receptionServiceRes = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq);
//
//
//
//      }
//else if((calculateCalcServiceCollectionComRespDto!= null&& calculateCalcServiceCollectionComRespDto.getCalcResult() == 0)){
//       //elseif(D4-计算服务集合(公共).计算结果 等于 0)  27395
//
//QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
//    QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto=new QueryConfItemMatchAnswerDetailComReqDto();
//  queryConfItemMatchAnswerDetailComReqDto.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:613269_1_27397
//queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("IMPOWER_QUANTITY_LACK_UNUSABLE");//CUSTOM_CONVENTION//sourceId:613266_1_27397
//queryConfItemMatchAnswerDetailComReqDto.setIsPlatData("TRUE");//sourceId:613275_1_27397
//
//    /*D2-3查授权数量不足不可用文案[2486]   */
//    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfSchemeCode(),"D2执行开通方案有效性鉴权(公共)-D2-3查授权数量不足不可用文案-配置方案标识不能为空",false);
//Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(),"D2执行开通方案有效性鉴权(公共)-D2-3查授权数量不足不可用文案-配置项标识不能为空",false);
//Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getIsPlatData(),"D2执行开通方案有效性鉴权(公共)-D2-3查授权数量不足不可用文案-是否标准答案不能为空",false);
//      queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto);
//
//
//
//RefreshSchemeOpenRecordAuthUseTypeComRespDto refreshSchemeOpenRecordAuthUseTypeComRespDto = null;
//    RefreshSchemeOpenRecordAuthUseTypeComReqDto refreshSchemeOpenRecordAuthUseTypeComReqDto=new RefreshSchemeOpenRecordAuthUseTypeComReqDto();
//  if(reqDto!=null){
//      refreshSchemeOpenRecordAuthUseTypeComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613006_1_27396
//refreshSchemeOpenRecordAuthUseTypeComReqDto.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:613007_1_27396
//    }
//
//    /*D2更新方案开通记录授权使用类型状态(公共)[5715]   */
//    Assert.isNull(refreshSchemeOpenRecordAuthUseTypeComReqDto.getConfSchemeId(),"D2执行开通方案有效性鉴权(公共)-D2更新方案开通记录授权使用类型状态(公共)-配置方案ID 不能为空",false);
//Assert.isNull(refreshSchemeOpenRecordAuthUseTypeComReqDto.getTenantSpaceId(),"D2执行开通方案有效性鉴权(公共)-D2更新方案开通记录授权使用类型状态(公共)-租户空间ID不能为空",false);
//      refreshSchemeOpenRecordAuthUseTypeComRespDto = refreshSchemeOpenRecordAuthUseTypeCom(refreshSchemeOpenRecordAuthUseTypeComReqDto);
//
//
//
//    }
//      }
//      }
//else if((reqDto!= null&&  reqDto.getAuthType() !=null && reqDto.getAuthType().equals("QUANTITY"))){
//       //elseif(D2执行开通方案有效性鉴权(公共).授权类型 等于 数量型)  27368
//
//CheckTimeScopeSearchComRespDto checkTimeScopeSearchComRespDto = null;
//    CheckTimeScopeSearchComReqDto checkTimeScopeSearchComReqDto=new CheckTimeScopeSearchComReqDto();
//  checkTimeScopeSearchComReqDto.setCurrentTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:612765_1_27369
//if(reqDto!=null){
//      checkTimeScopeSearchComReqDto.setCompareTime(reqDto.getImpowerEndTime());//SimpleFieldAssign//sourceId:612767_1_27369
//    }
//
//    /*D2检查时间范围查询(公共)[3297]   */
//    Assert.isNull(checkTimeScopeSearchComReqDto.getCurrentTime(),"D2执行开通方案有效性鉴权(公共)-D2检查时间范围查询(公共)-当前时间不能为空",false);
//Assert.isNull(checkTimeScopeSearchComReqDto.getCompareTime(),"D2执行开通方案有效性鉴权(公共)-D2检查时间范围查询(公共)-比较时间不能为空",false);
//      checkTimeScopeSearchComRespDto = divineDataService.checkTimeScopeSearchCom(checkTimeScopeSearchComReqDto);
//
//
//
//if((checkTimeScopeSearchComRespDto!= null&&  checkTimeScopeSearchComRespDto.getTimeCompareResult() !=null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("BEFORE")&&checkTimeScopeSearchComRespDto!= null&&  checkTimeScopeSearchComRespDto.getTimeCompareResult() !=null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("PRESENT"))) {
//        //if((D2检查时间范围查询(公共).时间比较结果 等于 之前（小于） and D2检查时间范围查询(公共).时间比较结果 等于 当前（等于）))  27370
//
////ModelCode: receptionService
//        ObtainReceiveFieldsRespDto receptionServiceRes_2 = null;
//    ObtainReceiveFieldsReqDto receptionServiceReq_1=new ObtainReceiveFieldsReqDto();
//  receptionServiceReq_1.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:612832_1_27371
//
//    /*M2-约定允许操作[4007]  用于特殊方法接收上游入参。 */
//    Assert.isNull(receptionServiceReq_1.getOutputNum(),"D2执行开通方案有效性鉴权(公共)-M2-约定允许操作-传输数值（整数型）不能为空",false);
//      receptionServiceRes_2 = nbSchemeOpenRecord.obtainReceiveFields(receptionServiceReq_1);
//
//
//
//      }
//else if((checkTimeScopeSearchComRespDto!= null&&  checkTimeScopeSearchComRespDto.getTimeCompareResult() !=null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("LATER"))){
//       //elseif(D2检查时间范围查询(公共).时间比较结果 等于 之后（大于）)  27372
//
//QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_2 = null;
//    QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_1=new QueryConfItemMatchAnswerDetailComReqDto();
//  queryConfItemMatchAnswerDetailComReqDto_1.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:612837_1_27373
//queryConfItemMatchAnswerDetailComReqDto_1.setConfItemCode("IMPOWER_EXPIRE_UNUSABLE");//CUSTOM_CONVENTION//sourceId:612834_1_27373
//queryConfItemMatchAnswerDetailComReqDto_1.setIsPlatData("TRUE");//sourceId:612843_1_27373
//
//    /*D2-3查授权到期不可用文案[2486]   */
//    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfSchemeCode(),"D2执行开通方案有效性鉴权(公共)-D2-3查授权到期不可用文案-配置方案标识不能为空",false);
//Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfItemCode(),"D2执行开通方案有效性鉴权(公共)-D2-3查授权到期不可用文案-配置项标识不能为空",false);
//Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getIsPlatData(),"D2执行开通方案有效性鉴权(公共)-D2-3查授权到期不可用文案-是否标准答案不能为空",false);
//      queryConfItemMatchAnswerDetailComRespDto_2 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_1);
//
//
//
//RefreshSchemeOpenRecordAuthUseTypeComRespDto refreshSchemeOpenRecordAuthUseTypeComRespDto_1 = null;
//    RefreshSchemeOpenRecordAuthUseTypeComReqDto refreshSchemeOpenRecordAuthUseTypeComReqDto_1=new RefreshSchemeOpenRecordAuthUseTypeComReqDto();
//  if(reqDto!=null){
//      refreshSchemeOpenRecordAuthUseTypeComReqDto_1.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613006_1_27374
//refreshSchemeOpenRecordAuthUseTypeComReqDto_1.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:613007_1_27374
//    }
//
//    /*D2更新方案开通记录授权使用类型状态(公共)[5715]   */
//    Assert.isNull(refreshSchemeOpenRecordAuthUseTypeComReqDto_1.getConfSchemeId(),"D2执行开通方案有效性鉴权(公共)-D2更新方案开通记录授权使用类型状态(公共)-配置方案ID 不能为空",false);
//Assert.isNull(refreshSchemeOpenRecordAuthUseTypeComReqDto_1.getTenantSpaceId(),"D2执行开通方案有效性鉴权(公共)-D2更新方案开通记录授权使用类型状态(公共)-租户空间ID不能为空",false);
//      refreshSchemeOpenRecordAuthUseTypeComRespDto_1 = refreshSchemeOpenRecordAuthUseTypeCom(refreshSchemeOpenRecordAuthUseTypeComReqDto_1);
//
//
//
//    }
//    }
//ImplementSchemeOpenRecordValidityAuthenticationComRespDto retData = new ImplementSchemeOpenRecordValidityAuthenticationComRespDto();
//
//
//
//
//
//return retData;
//  }
///**
//   * D2更新方案开通记录授权使用类型状态(公共)[5715]
//   * gen by moon at 1/16/2023, 5:56:28 PM
//   */
//  @Trace(operationName = "D2更新方案开通记录授权使用类型状态(公共)")
//  @Tags({@Tag(key = "参数",value = "arg[0]"),
//            @Tag(key = "返回值",value = "returnedObj")})
//  @Transactional(rollbackFor=Exception.class)
//  @Override
//  public RefreshSchemeOpenRecordAuthUseTypeComRespDto refreshSchemeOpenRecordAuthUseTypeCom(RefreshSchemeOpenRecordAuthUseTypeComReqDto reqDto){
//
//
//      //virtualUsage 2-3-12查询方案开通记录详情  27376
//      OmsSchemeOpenRecord omsSchemeOpenRecord = null;
//    QuerySchemeOpenRecordDetailReq querySchemeOpenRecordDetailReq=new QuerySchemeOpenRecordDetailReq();
//  querySchemeOpenRecordDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:612976_1_27376
//if(reqDto!=null){
//      querySchemeOpenRecordDetailReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:612973_1_27376
//querySchemeOpenRecordDetailReq.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:612975_1_27376
//    }
//
//    /*2-3-12查询方案开通记录详情[1954]   */
//    Assert.isNull(querySchemeOpenRecordDetailReq.getConfSchemeId(),"D2更新方案开通记录授权使用类型状态(公共)-2-3-12查询方案开通记录详情-配置方案ID不能为空",false);
//Assert.isNull(querySchemeOpenRecordDetailReq.getTenantSpaceId(),"D2更新方案开通记录授权使用类型状态(公共)-2-3-12查询方案开通记录详情-租户空间ID不能为空",false);
//Assert.isNull(querySchemeOpenRecordDetailReq.getSubjectLifeCycle(),"D2更新方案开通记录授权使用类型状态(公共)-2-3-12查询方案开通记录详情-主体生命周期不能为空",false);
//      omsSchemeOpenRecord = mOmsSchemeOpenRecordService.querySchemeOpenRecordDetail(querySchemeOpenRecordDetailReq);
//
//
//
//if((omsSchemeOpenRecord != null )&&(omsSchemeOpenRecord!= null&&  omsSchemeOpenRecord.getAuthType() !=null && omsSchemeOpenRecord.getAuthType().equals("CYCLE_TIME")||omsSchemeOpenRecord!= null&&  omsSchemeOpenRecord.getAuthType() !=null && omsSchemeOpenRecord.getAuthType().equals("FIXED_TIME"))) {
//        //if(2-3-12查询方案开通记录详情.出参 值不等于空  and (2-3-12查询方案开通记录详情.授权类型 等于 周期时间型 or 2-3-12查询方案开通记录详情.授权类型 等于 固定时间型))  27377
//
//boolean bOOLEAN ;
//    if(omsSchemeOpenRecord !=null){
//          OmsSchemeOpenRecord omsSchemeOpenRecord_2=new OmsSchemeOpenRecord();
//  omsSchemeOpenRecord_2.setAuthUseType("EXPIRE__DISABLED");//sourceId:612997_1_27378
//if(omsSchemeOpenRecord!=null){
//      omsSchemeOpenRecord_2.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:612852_1_27378
//    }
//
//    /*2-3-12修改方案开通记录（到期不可用）[1952]   */
//    Assert.isNull(omsSchemeOpenRecord_2.getSchOpenRecordId(),"D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（到期不可用）-方案开通记录ID不能为空",false);
//Assert.isNull(omsSchemeOpenRecord_2.getAuthUseType(),"D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（到期不可用）-授权使用类型不能为空",false);
//      bOOLEAN = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_2);
//
//
//
//           }
//      }
//else if((omsSchemeOpenRecord != null &&omsSchemeOpenRecord!= null&&  omsSchemeOpenRecord.getAuthType() !=null && omsSchemeOpenRecord.getAuthType().equals("QUANTITY"))){
//       //elseif((2-3-12查询方案开通记录详情.出参 值不等于空  and 2-3-12查询方案开通记录详情.授权类型 等于 数量型))  27379
//
//boolean bOOLEAN_1 ;
//    if(omsSchemeOpenRecord !=null){
//          OmsSchemeOpenRecord omsSchemeOpenRecord_3=new OmsSchemeOpenRecord();
//  omsSchemeOpenRecord_3.setRemainingQty(Long.valueOf(0));//CUSTOM_CONVENTION//sourceId:612999_1_27380
//omsSchemeOpenRecord_3.setAuthUseType("QUANTITY_INS_DISABLED");//sourceId:613005_1_27380
//if(omsSchemeOpenRecord!=null){
//      omsSchemeOpenRecord_3.setSchOpenRecordId(omsSchemeOpenRecord.getSchOpenRecordId());//SimpleFieldAssign//sourceId:612998_1_27380
//    }
//
//    /*2-3-12修改方案开通记录（数量不足不可用）[1952]   */
//    Assert.isNull(omsSchemeOpenRecord_3.getSchOpenRecordId(),"D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（数量不足不可用）-方案开通记录ID不能为空",false);
//Assert.isNull(omsSchemeOpenRecord_3.getRemainingQty(),"D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（数量不足不可用）-剩余授权数不能为空",false);
//Assert.isNull(omsSchemeOpenRecord_3.getAuthUseType(),"D2更新方案开通记录授权使用类型状态(公共)-2-3-12修改方案开通记录（数量不足不可用）-授权使用类型不能为空",false);
//      bOOLEAN_1 = mOmsSchemeOpenRecordService.updateSchemeOpenRecord(omsSchemeOpenRecord_3);
//
//
//
//           }
//    }
//RefreshSchemeOpenRecordAuthUseTypeComRespDto retData = new RefreshSchemeOpenRecordAuthUseTypeComRespDto();
//
//
//
//
//
//return retData;
//  }
///**
//   * D2执行同时编辑的授权对象数校验(公共)[5719]
//   * gen by moon at 1/16/2023, 5:56:29 PM
//   */
//  @Trace(operationName = "D2执行同时编辑的授权对象数校验(公共)")
//  @Tags({@Tag(key = "参数",value = "arg[0]"),
//            @Tag(key = "返回值",value = "returnedObj")})
//  @Transactional(rollbackFor=Exception.class)
//  @Override
//  public ImplementSimultaneouslyCanEditObjNumValidityComRespDto implementSimultaneouslyCanEditObjNumValidityCom(ImplementSimultaneouslyCanEditObjNumValidityComReqDto reqDto){
//
//
//      //virtualUsage D2查询正在编辑的方案授权对象列表(公共)  27398
//      QuerySchemeAuthObjListComRespDto querySchemeAuthObjListComRespDto = null;
//    QuerySchemeAuthObjListComReqDto querySchemeAuthObjListComReqDto=new QuerySchemeAuthObjListComReqDto();
//  querySchemeAuthObjListComReqDto.setSubjectLifeCycle("EDITING");//sourceId:613344_1_27398
//if(reqDto!=null){
//      querySchemeAuthObjListComReqDto.setApplexType(reqDto.getApplexType());//SimpleFieldAssign//sourceId:613343_1_27398
//querySchemeAuthObjListComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613346_1_27398
//    }
//
//    /*D2查询正在编辑的方案授权对象列表(公共)[5716]   */
//    Assert.isNull(querySchemeAuthObjListComReqDto.getApplexType(),"D2执行同时编辑的授权对象数校验(公共)-D2查询正在编辑的方案授权对象列表(公共)-应用实例类型不能为空",false);
//Assert.isNull(querySchemeAuthObjListComReqDto.getConfSchemeId(),"D2执行同时编辑的授权对象数校验(公共)-D2查询正在编辑的方案授权对象列表(公共)-配置方案ID 不能为空",false);
//Assert.isNull(querySchemeAuthObjListComReqDto.getSubjectLifeCycle(),"D2执行同时编辑的授权对象数校验(公共)-D2查询正在编辑的方案授权对象列表(公共)-主体生命周期不能为空",false);
//      querySchemeAuthObjListComRespDto = querySchemeAuthObjListCom(querySchemeAuthObjListComReqDto);
//
//
//
//if((querySchemeAuthObjListComRespDto!= null&&  querySchemeAuthObjListComRespDto.getCommPrimaryKeyList() !=null && querySchemeAuthObjListComRespDto.getCommPrimaryKeyList().size()>1)) {
//        //if(D2查询正在编辑的方案授权对象列表(公共).通用主键列表数据集条数 大于 1)  27399
//
//ImplementCountNumberDataSetsComRespDto implementCountNumberDataSetsComRespDto = null;
//    if(querySchemeAuthObjListComRespDto !=null){
//          ImplementCountNumberDataSetsComReqDto implementCountNumberDataSetsComReqDto=new ImplementCountNumberDataSetsComReqDto();
//  //todo dong 未找到匹配生成策略,请检查生成策略implementCountNumberDataSetsComReqDto.setCountNumberDataSetsList(querySchemeAuthObjListComRespDto.getCommPrimaryKeyList()),数据源项; to( ==>tableName:undefined, fieldEnname:countNumberDataSetsList ,uniqueId: 613439_1_27402 uniqueSourceId:613345_1_27398) from (varName:undefined fieldquerySchemeAuthObjListComRespDto.getCommPrimaryKeyList())
//
//    /*D2-执行统计数据集条数服务(公共)[5166]   */
//
//      implementCountNumberDataSetsComRespDto = interfaceModeService.implementCountNumberDataSetsCom(implementCountNumberDataSetsComReqDto);
//
//
//
//           }
//CalculateCalcServiceCollectionComRespDto calculateCalcServiceCollectionComRespDto = null;
//    if(implementCountNumberDataSetsComRespDto !=null){
//          Object calculateCalcServiceCollectionComReqDto=new Object();
//  calculateCalcServiceCollectionComReqDto.setCalcFormula("SUBTRACTION_OF_TWO_NUM");//sourceId:613429_1_27401
//if(implementCountNumberDataSetsComRespDto!=null){
//      calculateCalcServiceCollectionComReqDto.setCalcPara1(implementCountNumberDataSetsComRespDto.getOutputNum()!=null?Double.valueOf(implementCountNumberDataSetsComRespDto.getOutputNum()):null);//SimpleFieldAssign//sourceId:613431_1_27401
//    }
//if(reqDto!=null){
//      calculateCalcServiceCollectionComReqDto.setCalcPara2(reqDto.getSimultaneouslyCanEditObjNum()!=null?Double.valueOf(reqDto.getSimultaneouslyCanEditObjNum()):null);//SimpleFieldAssign//sourceId:613432_1_27401
//    }
//
//    /*D4-计算服务集合(公共)[5091]   */
//    Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcFormula(),"D2执行同时编辑的授权对象数校验(公共)-D4-计算服务集合(公共)-通用计算公式不能为空",false);
//Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara1(),"D2执行同时编辑的授权对象数校验(公共)-D4-计算服务集合(公共)-计算入参1不能为空",false);
//Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara2(),"D2执行同时编辑的授权对象数校验(公共)-D4-计算服务集合(公共)-计算入参2不能为空",false);
//      calculateCalcServiceCollectionComRespDto = calcCalculationRulesService.calculateCalcServiceCollectionCom(calculateCalcServiceCollectionComReqDto);
//
//
//
//           }
//if((calculateCalcServiceCollectionComRespDto!= null&& calculateCalcServiceCollectionComRespDto.getCalcResult() > 0)) {
//        //if(D4-计算服务集合(公共).计算结果 大于 0)  27403
//
//UpdateSpaceComRespDto updateSpaceComRespDto = null;
//    Object updateSpaceComReqDto=new Object();
//  updateSpaceComReqDto.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:613428_1_27404
//if(reqDto!=null){
//      updateSpaceComReqDto=reqDto.getTenantSpaceId();;//SimpleFieldAssign//sourceId:613427_1_27404
//    }
//
//    /*D1修改空间创建时间(公共)[5720]   */
//    Assert.isNull(updateSpaceComReqDto,"D2执行同时编辑的授权对象数校验(公共)-D1修改空间创建时间(公共)-空间ID不能为空",false);
//Assert.isNull(updateSpaceComReqDto,"D2执行同时编辑的授权对象数校验(公共)-D1修改空间创建时间(公共)-创建时间不能为空",false);
//      updateSpaceComRespDto = baseBaseService.updateSpaceCom(updateSpaceComReqDto);
//
//
//
//      }
//      }
//ImplementSimultaneouslyCanEditObjNumValidityComRespDto retData = new ImplementSimultaneouslyCanEditObjNumValidityComRespDto();
//
//
//
//
//
//return retData;
//    }
//    //
}
